lhotari commented on code in PR #24610:
URL: https://github.com/apache/pulsar/pull/24610#discussion_r2259167433


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ZeroQueueConsumerImpl.java:
##########
@@ -215,4 +215,18 @@ protected void setCurrentReceiverQueueSize(int newSize) {
         //receiver queue size is fixed as 0.
         throw new NotImplementedException("Receiver queue size can't be 
changed in ZeroQueueConsumerImpl");
     }
+
+    @Override
+    protected void processPayloadByProcessor(BrokerEntryMetadata 
brokerEntryMetadata,
+                                             MessageMetadata messageMetadata, 
ByteBuf byteBuf,
+                                             MessageIdImpl messageId, 
Schema<T> schema,
+                                             int redeliveryCount, List<Long> 
ackSet, long consumerEpoch) {
+        if (this.isBatch(messageMetadata)) {
+            this.receiveIndividualMessagesFromBatch(brokerEntryMetadata,
+                    messageMetadata, redeliveryCount, ackSet, byteBuf, null, 
null, consumerEpoch, false);

Review Comment:
   refactor the receiveIndividualMessagesFromBatch method and extract an error 
handling method instead of calling receiveIndividualMessagesFromBatch here. The 
call to receiveIndividualMessagesFromBatch was causing the confusion in the 
initial version of the code and this problem would be resolved by extracting 
the error handling method. It could be called 
`rejectBatchMessageByClosingConsumer` etc.



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to