Closed xj-zh-dev closed 3 years ago
what do you mean by 'rebalance' here ?
It will be nice if you can provide demo code to reproduce your situation.
If you want to keep the messages from mq equally distributed among all your consumers, Channel.Qos()
is for you.
See https://github.com/streadway/amqp/blob/master/channel.go#L613
what do you mean by 'rebalance' here ?
It will be nice if you can provide demo code to reproduce your situation.
It's not the code issue, just occurs when consumers restart.
in Chinese: 在consumer重启的时候,很多消费者的时候,这时候消息队列有阻塞,后发的消息会被先处理一部分。
Sounds like this isn't an issue? Open another one with more details if it's still a problem please.
I found that mq is very long, then start more consumers don't take effect.
Then, I restart old consumers, these new consumers begin to consume messages in the very long queue.
Does rabbitmq support rebalance? And how to support rabbit mq consumer rebalance?