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/12/01 02:46:33 UTC

[GitHub] davidpdw opened a new issue #569: partitionally ordered message question

davidpdw opened a new issue #569: partitionally ordered message question
URL: https://github.com/apache/rocketmq/issues/569
 
 
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
   1、双主双从结构,两个master上面都有TestTopic
   
   2、使用局部顺序消息特性
   
   ```
   Message msg = new Message("TopicTest", tags[i % tags.length], "KEY" + i,
                       ("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET));
               SendResult sendResult = producer.send(msg, new MessageQueueSelector() {
               @Override
               public MessageQueue select(List<MessageQueue> mqs, Message msg, Object arg) {
                   Integer id = (Integer) arg;
                   int index = id % mqs.size();
                   return mqs.get(index);
               }
               }, orderId);
   ```
   
   3、首先发送一条消息,orderID=123456,假设第一条消息发送到broker-a的队列里面。在发送下一条orderID=123456的消息之前关闭broker-a的master节点和slave节点,这个时候在发送消息,消息就会发送到broker-b的队列里面了,这样消息就不能发送到一个队列里面了,严格局部顺序就不能保证了
   
   - What did you expect to see?
   
   严格的消息顺序,像broker-a只有master节点宕机时,后续消息发送直接快速失败,而不是直接发送到另一个master
   
   - What did you see instead?
   
   当broker-a的主从都宕机时,就会出现发送到broker-b,这样就不能保证严格消息顺序
   
   2. Please tell us about your environment:
   
   rocketmq 4.3.0
   2 namesrv 2 master 2 slave
   
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   
   或者是设计时就考虑到这种情况,只是RocketMQ不保证严格的顺序消息,在消费端还是要做一定的顺序判断处理
   

----------------------------------------------------------------
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