You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/10/25 11:18:09 UTC

[GitHub] yanliqing commented on issue #505: 事务消息如何支持顺序消费?

yanliqing commented on issue #505: 事务消息如何支持顺序消费?
URL: https://github.com/apache/rocketmq/issues/505#issuecomment-433012246
 
 
   > 可以根据相同的业务id,按发送顺序进行消费. 网上有很多的使用说明: 首先需要做到一组需要有序消费的消息发往同一个broker的同一个队列上,在多线程消费场景下,一个线程只去消费一个队列上的消息,那么自然就保证了消息消费的顺序性 https://blog.csdn.net/sunqingzhong44/article/details/72854432?utm_source=blogxgwz2 <https://blog.csdn.net/sunqingzhong44/article/details/72854432?utm_source=blogxgwz2>
   > […](#)
   > 在 2018年10月25日,下午3:35,严立青 ***@***.***> 写道: 如题,使用rocketmq的事务消息,怎样能保证消费顺序按照提交时间进行消费;或者根据相同的业务id往相同的队列上存数据? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#505>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ASbFX3VbrxAoFedMNzXkvzPrn8XYUoS2ks5uoWm2gaJpZM4X5qa9>.
   
   顺序消息我知道,除了保证消息顺序,还需要保证业务本地事务和消息发送的事务。即本地事务执行成功才能发送消息到rocketmq。据我了解rocketmq事务消息和顺序消息不能同时使用。我们目前的做法是本地事务中加一张消息表,本地操作和消息表同处一个事务,事务成功再发到顺序消息中由rocketmq保证消息顺序;
   但是又听说事务消息可以指定队列id往指定队列上发消息,如果能指定队列发事务消息也可以达到事务消息和顺序消息同时实现的目标,我粗略看了源码没有发现这样的使用方法

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services