casuallc commented on a change in pull request #12984:
URL: https://github.com/apache/pulsar/pull/12984#discussion_r760747224
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageIdImpl.java
##########
@@ -159,7 +159,7 @@ public static MessageId fromByteArrayWithTopic(byte[] data,
TopicName topicName)
} else {
messageId = new MessageIdImpl(idData.getLedgerId(),
idData.getEntryId(), idData.getPartition());
}
- if (idData.getPartition() > -1 && topicName != null) {
+ if (topicName != null) {
Review comment:
Consumer should tell broker which topic message to be acknowledged.
`MultiTopicsConsumerImpl` would check if `MessageId` is `TopicMessageIdImpl`
on method `doAcknowledge`.
```
@Override
protected CompletableFuture<Void> doAcknowledge(MessageId messageId, AckType
ackType,
Map<String,Long> properties,
TransactionImpl txnImpl) {
checkArgument(messageId instanceof TopicMessageIdImpl);
TopicMessageIdImpl topicMessageId = (TopicMessageIdImpl) messageId;
// ....
}
```
--
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]