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
|When the container is paused, stop processing after the current record instead of after processing all the records from the previous poll; the remaining records are retained in memory and will be passed to the listener when the container is resumed.
2586
+
2583
2587
|[[pollTimeout]]<<pollTimeout,`pollTimeout`>>
2584
2588
|5000
2585
2589
|The timeout passed into `Consumer.poll()`.
@@ -3789,6 +3793,10 @@ However, the consumers might not have actually paused yet.
3789
3793
3790
3794
In addition (also since 2.1.5), `ConsumerPausedEvent` and `ConsumerResumedEvent` instances are published with the container as the `source` property and the `TopicPartition` instances involved in the `partitions` property.
3791
3795
3796
+
Starting with version 2.9, a new container property `pauseImmediate`, when set to true, causes the pause to take effect after the current record is processed.
3797
+
By default, the pause takes effect when all of the records from the previous poll have been processed.
3798
+
See <<pauseImmediate>>.
3799
+
3792
3800
The following simple Spring Boot application demonstrates by using the container registry to get a reference to a `@KafkaListener` method's container and pausing or resuming its consumers as well as receiving the corresponding events:
0 commit comments