AnonHxy commented on issue #16680: URL: https://github.com/apache/pulsar/issues/16680#issuecomment-1200433052
> Why not do like the BatchMessageKeyBasedContainer and create your own - I have considered this solution before. `BatchMessageKeyBasedContainer` doesn't keep message's order because it is just used for key_shared subscription mode. And the document about `BatchMessageKeyBasedContainer` describes it's batch action and we can see that it sends batched message out of the incoming messages order: https://github.com/apache/pulsar/blob/eec0eb50074d54284e66f8c2f73d864691f05ec2/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageKeyBasedContainer.java#L30-L39 - If we implement a `BatchMessagePropertiesBasedContainer` like `BatchMessageKeyBasedContainer`, it has the same problem I think. For example: ``` * incoming single messages: * (<version:1>, v1), (<region:2>, v1), (<region:3> v1), (<region:1>, v2), (<region:2>, v2), (<region:3>, v2), (<region:1>, v3), (<region:2>, v3), (<region:3>, v3) * * batched into multiple batch messages: * [(<version:1>, v1), (<version:1>, v2), (<version:1>, v3)], [(<version:2>, v1), (<version:2>, v2), (<version:2>, v3)], [(<version:3>, v1), (<version:3>, v2), (<version:3>, v3)] ``` -- 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]
