[英]How to tell if every consumer finished in Spring Cloud Stream Kafka?
I'm trying to black-box test a Spring Boot application which is using Spring Cloud Stream Kafka.我正在尝试对使用 Spring Cloud Stream Kafka 的 Spring 引导应用程序进行黑盒测试。 The expected results (in the DB) may differ based on the message processing order.
预期结果(在 DB 中)可能因消息处理顺序而异。 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.将容器配置为发出
ListenerContainerIdleEvent
。
See https://docs.spring.io/spring-kafka/docs/current/reference/html/#idle-containers见https://docs.spring.io/spring-kafka/docs/current/reference/html/#idle-containers
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.