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 2021/04/25 06:57:21 UTC

[GitHub] [rocketmq] ChenYilei2016 opened a new issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

ChenYilei2016 opened a new issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837


   rocketmq 多个consumer  rebalnce 是自己进行的不和其他 consumer 交互.
   这样 会不会因为延迟原因啥的,  同时消费一个consumeQueue ,  我看到顺序消费者会在 rebalance的时候 进行一个lock操作, 为什么并发消费者不弄一个lock呢


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] ChenYilei2016 commented on issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

Posted by GitBox <gi...@apache.org>.
ChenYilei2016 commented on issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837#issuecomment-826275975


   > 顺序消息要保证每个queue里面的消息被顺序消费,因此需要保证增加或减少消费者实例时,需要重新负载均衡时,只能有一个消费者实例分配到这个queue。并发消费不需要保证顺序性,因此不需要lock
   
   也就是说 会存在多个consumer 同时消费一个queue的情况吧? 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] ChenYilei2016 commented on issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

Posted by GitBox <gi...@apache.org>.
ChenYilei2016 commented on issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837#issuecomment-826275975






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] panzhi33 commented on issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

Posted by GitBox <gi...@apache.org>.
panzhi33 commented on issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837#issuecomment-826275062






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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] RongtongJin closed issue #2837: Multiple consumer will be assigned the same consumequeue because of delay and other reasons?

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] ChenYilei2016 commented on issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

Posted by GitBox <gi...@apache.org>.
ChenYilei2016 commented on issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837#issuecomment-826326556


   > > > 顺序消息要保证每个queue里面的消息被顺序消费,因此需要保证增加或减少消费者实例时,需要重新负载均衡时,只能有一个消费者实例分配到这个queue。并发消费不需要保证顺序性,因此不需要lock
   > > 
   > > 
   > > 也就是说 会存在多个ConcurrentConsumer 同时消费一个queue的情况吧
   > > 虽然ConcurrentConsumer 不用保证顺序性, 但加上lock 也可以减少重复消费吧?
   > 
   > 加了lock就会损耗掉一些性能的,同时消费者上下线期间重新负载均衡时,这段时间有可能不能消费。为了保证高性能消费,因此需要牺牲消息的重复消费
   
   Thanks♪(・ω・)ノ


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] ChenYilei2016 edited a comment on issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

Posted by GitBox <gi...@apache.org>.
ChenYilei2016 edited a comment on issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837#issuecomment-826275975


   > 顺序消息要保证每个queue里面的消息被顺序消费,因此需要保证增加或减少消费者实例时,需要重新负载均衡时,只能有一个消费者实例分配到这个queue。并发消费不需要保证顺序性,因此不需要lock
   
   也就是说 会存在多个ConcurrentConsumer 同时消费一个queue的情况吧    
   虽然ConcurrentConsumer 不用保证顺序性, 但加上lock 也可以减少重复消费吧? 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] panzhi33 commented on issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

Posted by GitBox <gi...@apache.org>.
panzhi33 commented on issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837#issuecomment-826275062


   顺序消息要保证每个queue里面的消息被顺序消费,因此需要保证增加或减少消费者实例时,需要重新负载均衡时,只能有一个消费者实例分配到这个queue。并发消费不需要保证顺序性,因此不需要lock
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] panzhi33 commented on issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

Posted by GitBox <gi...@apache.org>.
panzhi33 commented on issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837#issuecomment-826279490


   > > 顺序消息要保证每个queue里面的消息被顺序消费,因此需要保证增加或减少消费者实例时,需要重新负载均衡时,只能有一个消费者实例分配到这个queue。并发消费不需要保证顺序性,因此不需要lock
   > 
   > 也就是说 会存在多个ConcurrentConsumer 同时消费一个queue的情况吧
   > 虽然ConcurrentConsumer 不用保证顺序性, 但加上lock 也可以减少重复消费吧?
   
   加了lock就会损耗掉一些性能的,同时消费者上下线期间重新负载均衡时,这段时间有可能不能消费。为了保证高性能消费,因此需要牺牲消息的重复消费


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] ChenYilei2016 edited a comment on issue #2837: 多个Consumer会因为延迟等原因被分配同一个consumeQueue吗

Posted by GitBox <gi...@apache.org>.
ChenYilei2016 edited a comment on issue #2837:
URL: https://github.com/apache/rocketmq/issues/2837#issuecomment-826275975


   > 顺序消息要保证每个queue里面的消息被顺序消费,因此需要保证增加或减少消费者实例时,需要重新负载均衡时,只能有一个消费者实例分配到这个queue。并发消费不需要保证顺序性,因此不需要lock
   
   也就是说 会存在多个ConcurrentConsumer 同时消费一个queue的情况吧    
   虽然ConcurrentConsumer 不用保证顺序性, 但加上lock 也可以减少重复消费吧? 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org