mattisonchao commented on code in PR #19585:
URL: https://github.com/apache/pulsar/pull/19585#discussion_r1113797245
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1075,6 +1075,10 @@ private void closeConsumerTasks() {
}
negativeAcksTracker.close();
stats.getStatTimeout().ifPresent(Timeout::cancel);
+ // Execute "clearIncomingMessages" regardless of whether
"internalPinnedExecutor" has shutdown or not.
+ // Call "clearIncomingMessages" in "internalPinnedExecutor" is used to
clear messages in flight.
+ clearIncomingMessages();
+ internalPinnedExecutor.execute(this::clearIncomingMessages);
Review Comment:
If `internalPinnedExecutor` is shutdown, it will throw an exception. Please
catch it. Or if you can confirm that this method always runs before the
`internalPinnedExecutor` shutdown.
--
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]