[ https://issues.apache.org/jira/browse/BOOKKEEPER-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthieu Morel updated BOOKKEEPER-37: ------------------------------------- Attachment: BOOKKEEPER-37.patch Patch including regression test. Proposed solution is to use 1 netty channel per topic, and therefore wait for a channel to be open for a given topic. This guarantees ordering. Note: we may need some timeouts, but I don't know which variable/value to use. > Ordering of published messages is not preserved when doing asynchronous > publication > ----------------------------------------------------------------------------------- > > Key: BOOKKEEPER-37 > URL: https://issues.apache.org/jira/browse/BOOKKEEPER-37 > Project: Bookkeeper > Issue Type: Bug > Components: hedwig-client > Reporter: Matthieu Morel > Attachments: BOOKKEEPER-37.patch, ClientMessageOrderingTest.java > > > Symptoms: > - if a publisher sends messages asynchronously through the asyncPublish > method, the ordering is not preserved in Hedwig > Example: > - a publisher sends M1, M2, M3 by invoking the asyncPublish method > The Hedwig broker may see these messages in the following order: M2, M1, M3 > A subscriber will also see messages as M2, M1, M3 > How to reproduce: > - see attached test case: synchronous publishing preserves ordering, but > asynchronous publishing does not. > The cause of the problem: > - my understanding is that this is due to asynchronous creation of multiple > netty channels on the publisher side. There is no ordering since messages are > not sent through the same channel. > Suggested solution: > Some buffering on the publisher side would allow to reuse the same channel > and maintain ordering. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira