sijie commented on a change in pull request #5429: fix: java doc on MessageListener - acknowledgement part URL: https://github.com/apache/pulsar/pull/5429#discussion_r337302959
########## File path: pulsar-client-1x-base/pulsar-client-1x/src/main/java/org/apache/pulsar/client/api/MessageListener.java ########## @@ -33,6 +33,8 @@ * * This method will only be called once for each message, unless either application or broker crashes. * + * Implementation should acknowledge messages by calling consumer.acknowledge(msg). Review comment: I am not sure the changes here. 1) I don't think an implementation need to ack messages. *should* here is a bit misleading. 2) there are many methods to ack a message, ack vs ackCumulative, sync vs async. Also it is recommended to call async methods in the message listener otherwise a sync method can block the listener thread. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services