kirktrue commented on code in PR #17699:
URL: https://github.com/apache/kafka/pull/17699#discussion_r1868793606
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1032,10 +1042,7 @@ public Set<TopicPartition> paused() {
public void pause(Collection<TopicPartition> partitions) {
acquireAndEnsureOpen();
try {
- log.debug("Pausing partitions {}", partitions);
- for (TopicPartition partition : partitions) {
- subscriptions.pause(partition);
- }
+ applicationEventHandler.addAndGet(new
PausePartitionsEvent(partitions, defaultApiTimeoutDeadlineMs()));
Review Comment:
The events’ constructors will throw a `NullPointerException` by virtue of
either calling `Objects.requireNonnull()` or
`Collections.unmodifiableCollection()`. However, I went ahead and added the
checks explicitly at the `AsyncKafkaConsumer` layer. I also added a check to
no-op if the collection is empty.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]