Lanayx opened a new issue #9557: URL: https://github.com/apache/pulsar/issues/9557
**Describe the bug** Since batch message acknowledgement was added the seek method was updated to support more precise seek using ack sets ([source code](https://github.com/apache/pulsar/blob/branch-2.6/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java#L1852-L1857)). However when the seek is performed by the message that was serialized and deserialized, the _batchSize_ is set to zero (since[ it is ignored during serialization](https://github.com/apache/pulsar/blob/30315508fc53350e1588974a9049d57d895ae862/pulsar-client/src/main/java/org/apache/pulsar/client/impl/MessageIdImpl.java#L152-L164)), which leads to discrepancy between messageId forms and seek results. **To Reproduce** Compare BatchMessageIdImpl in runtime before and after serialization+deserialization, the _batchSize_ will be always 0 in latter case. This leads to inconsistent behavior of Consumer seek by messageId **Expected behavior** There should be no difference between regular BatchMessageIdImpl and recovered from byteArray ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
