crossoverJie opened a new pull request, #893:
URL: https://github.com/apache/pulsar-client-go/pull/893

   Fixes #453 
   
   ### Motivation
   
   Sometimes we need to deal with some messages manually.
   
   ```go
   pb "github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto"
   
        msgID := &pb.MessageIdData{
                LedgerId:             proto.Uint64(699),
                EntryId:              proto.Uint64(11),
                Partition:            proto.Int32(0),
                BatchIndex:           proto.Int32(0),
        }
        bytes, _ := proto.Marshal(msgID)
        id, _ := pulsar.DeserializeMessageID(bytes)
        err = consumer.AckID(id)
   ```
   Here is the nonsensical serialization and deserialization code, also `pb` is 
an internal package and cannot be accessed externally.
   
   
   ### Modifications
   
   Add the `NewMessageID()` method.
   
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   


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