I'm trying to black-box test a Spring Boot application which is using Spring Cloud Stream Kafka. The expected results (in the DB) may differ based on the message processing order. How could I reliably tell if one message was processed and I can send in the next? One important factor is that one message from the test can generate multiple events (messages) within the application.
I did the following methods:
Is there any official way of doing this?
Configure the container to emit ListenerContainerIdleEvent
s.
See https://docs.spring.io/spring-kafka/docs/current/reference/html/#idle-containers