codelipenghui commented on code in PR #22091:
URL: https://github.com/apache/pulsar/pull/22091#discussion_r1502425225
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1643,6 +1643,14 @@ void
receiveIndividualMessagesFromBatch(BrokerEntryMetadata brokerEntryMetadata,
singleMessageMetadata, uncompressedPayload,
batchMessage, schema, true,
ackBitSet, ackSetInMessageId, redeliveryCount,
consumerEpoch);
if (message == null) {
+ if (ackBitSet != null && !ackBitSet.get(i)) {
Review Comment:
We'd better add a new method, such as `boolean
isSingleMessageAcked(BitSetRecyclable ackBitSe)`
So that we can use the new method here and `newSingleMessage()` method.
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1643,6 +1643,14 @@ void
receiveIndividualMessagesFromBatch(BrokerEntryMetadata brokerEntryMetadata,
singleMessageMetadata, uncompressedPayload,
batchMessage, schema, true,
ackBitSet, ackSetInMessageId, redeliveryCount,
consumerEpoch);
if (message == null) {
+ if (ackBitSet != null && !ackBitSet.get(i)) {
Review Comment:
Then we can simplify here to
if (!isSingleMessageAcked()) {
skippedMessages++;
}
continue;
--
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]