intkuroky opened a new pull request, #1411: URL: https://github.com/apache/pulsar-client-go/pull/1411
### Motivation This PR fixes an issue where sequenceID was generated at message creation time instead of send time, causing out-of-order sequence IDs when batching is enabled. The sequenceID lifecycle (generation -> local storage -> network transmission) must be serialized to ensure consistency. ### Modifications 1. sequenceID generation is deferred until messages are actually processed (local storage & network transmission), and the generation method is changed to non-thread-safe since concurrent access is neither needed nor supported. 2. During message batching, messages must be stored first with size estimation, then sequenceIDs are generated and assigned in batch before final processing. This is a direct consequence of the deferred sequenceID generation. -- 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]
