Thanks Penghui for the comments. Seems Message Key is mostly used in such a case, and by this design, the original protocol will no need too much change. If you are afraid of broken other feature. I would like to add an item “ordering_key” in "MessageMetadata" to serve this feature.
Best Regards. Jia Zhai Beijing, China Mobile: +86 15810491983 On Thu, Apr 4, 2019 at 12:51 AM PengHui Li <codelipeng...@gmail.com> wrote: > Hi jia, > > Is it better by a separate attribute to indicate the order? If i am > not mistaken the compaction topic is depends on the message key, does this > mean that it is not easy for users to use both of these features at the > same time? > > Jia Zhai <zhai...@apache.org>于2019年4月3日 周三17:09写道: > > > Hi all, > > > > I would like to init a discuss of "PIP 34: Add new subscribe type -- > > Key_Failover" here. > > > > At present, there are 3 kinds of subscription modes: exclusive, shared, > and > > failover. Shared mode subscription is used a lot, because consumers could > > effectively parallel consume messages of same partition. But using > shared > > mode will not keep the message order of same key, It would be good to > > leverage share mode, while also keeping the ordering of messages. > > > > This Proposal trying to introduce a new subscribe type Key_Failover to > > extend shared type. By Key_Failover, one partition could have several > > consumers to parallel consume messages, while all messages with the same > > key will be dispatched to only one consumer. > > > > Here is the link contains more information of this PIP: > > > > > https://github.com/apache/pulsar/wiki/PIP-34%3A-Add-new-subscribe-type-Key_Failover > > > > Thanks. > > >