You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/asciidoc/kafka.adoc
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1476,6 +1476,65 @@ However, the consumers might not have actually paused yet; `isConsumerPaused()`
1476
1476
1477
1477
In addition, also since _2.1.5_, `ConsumerPausedEvent` s and `ConsumerResumedEvent` s are published with the container as the `source` property and the `TopicPatition` s involved in the `partitions` s property.
1478
1478
1479
+
This simple Spring Boot application demonstrates using the container registry to get a reference to a `@KafkaListener` method's container and pausing/resuming its consumers, as well as receiving the corresponding events.
1480
+
1481
+
[source, java]
1482
+
----
1483
+
@SpringBootApplication
1484
+
public class Application implements ApplicationListener<KafkaEvent> {
0 commit comments