Gleiphir2769 commented on code in PR #805:
URL: https://github.com/apache/pulsar-client-go/pull/805#discussion_r1002951350
##########
pulsar/consumer_impl.go:
##########
@@ -456,20 +466,15 @@ func (c *consumer) Ack(msg Message) error {
// AckID the consumption of a single message, identified by its MessageID
func (c *consumer) AckID(msgID MessageID) error {
- mid, ok := c.messageID(msgID)
- if !ok {
- return errors.New("failed to convert trackingMessageID")
- }
-
- if mid.consumer != nil {
- return mid.Ack()
+ if err := c.checkMsgIDPartition(msgID); err != nil {
Review Comment:
`trackingMessageID` does not records chunking infomation.
For example, `Ack()` a big message need to ack all the chunks of it. Using
`trackingMessageID` can not figure out which chunk (messageId) need to be ack.
`trackingMessageID` is designed to tracking batch messages so it shoud not
be the messageId type accepted by the method exposed by `partitionConsumer`. I
think the better way would be to accept `MessageID ` as the messageId type in
partitionConsumer methods. However, only the necessary interfaces have been
modified (`Ack`, `NAck` and `Seed`) for the least changes
--
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]