lhotari commented on code in PR #25386:
URL: https://github.com/apache/pulsar/pull/25386#discussion_r2974113983
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1815,13 +1816,14 @@ void
receiveIndividualMessagesFromBatch(BrokerEntryMetadata brokerEntryMetadata,
continue;
}
executeNotifyCallback(message);
+ processedMessages++;
}
if (ackBitSet != null) {
ackBitSet.recycle();
}
- } catch (IllegalStateException e) {
- log.warn("[{}] [{}] unable to obtain message in batch",
subscription, consumerName, e);
- discardCorruptedMessage(messageId, cnx,
ValidationError.BatchDeSerializeError);
+ } catch (IllegalStateException | IllegalArgumentException e) {
+ discardCorruptedBatchMessage(messageId, cnx,
+ (batchSize - skippedMessages - processedMessages),
ValidationError.BatchDeSerializeError);
Review Comment:
There's also another existing bug: the acknowledgements of messages already
in processing are getting ignored, assuming that batch index acknowledgement is
used. It might be useful to also fix that issue while fixing problems in this
area.
I'd assume that the fix would be to pass an ack set where the remaining
indices are acknowledged (when batch index ack is enabled).
--
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]