codelipenghui commented on code in PR #24476:
URL: https://github.com/apache/pulsar/pull/24476#discussion_r2180420338
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java:
##########
@@ -571,6 +571,11 @@ protected CompletableFuture<Void>
doReconsumeLater(Message<?> message, AckType a
@Override
public void negativeAcknowledge(MessageId messageId) {
+ if (getState() != State.Ready) {
+ log.warn("[{}] [{}] Cannot negative acknowledge message {} -
consumer is not ready (state: {})",
Review Comment:
@nodece
It will break the API since we didn't declare the PulsarClientException for
the method signature.
And if the consumer gets closed, all the unacked messages will be
redelivered automatically. Users don't need to care about the failures of
negativeAcknowledge() in this case.
--
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]