Gleiphir2769 commented on code in PR #805:
URL: https://github.com/apache/pulsar-client-go/pull/805#discussion_r970253454


##########
pulsar/consumer_impl.go:
##########
@@ -453,16 +465,16 @@ 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()
+       partition := int(msgID.PartitionIdx())

Review Comment:
   > Why not make a method to check the partition or the msgID?
   
   Good suggestion, I will make the method.
   
   > You can improve messageID() method.
   
   `messageID()` converts the `MessageID` to `trackingMessageID`. It will cause 
the type lost of `chunkMessageID`.



-- 
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]

Reply via email to