问题描述
Event Hub消费端消费事件延迟,并且有重新分配分区等行为,讨论这种现象的可能原因。
问题解答
Event Hub 如果有大量的 Rebalancing 请求,就会导致事件消费延迟。 而Rebalance的原因也与服务端和消费端的心跳探测有关,如果服务端失去了消费端的心跳请求,触发 Rebalance操作。
整个过程大体的情况如下:
1)新消费者加入,导致Rebalance
2)大多数消费者加入,但是有些消费者没有及时加入或心跳探测,因此这些消费者被移除。
3)在等待加入完成时,被移除的消费者要么作为新成员重新加入,要么迟到。
4)因此,进一步导致再平衡重置。
上述行为可能是由于连接问题或消费者不稳定性引起的。
Trace the initial cause of the rebalancing of the group and looks like it is related to consumer losing heartbeat. The group took a long time to become stable because there was a continuous pattern of missing heartbeats during the rebalancing. Kind of like the following sequence.
· New consumer join, causing rebalancing.
· Most of the consumers join, but some did not join or heartbeat in time, and so those consumers are removed.
· While waiting for join to complete, consumers that was removed either join as new member or return late.
· So it further caused rebalancing to reset.
The above behavior can happen due to connectivity, or consumer instability
标签:消费,join,消费者,Hub,rebalancing,Azure,Event From: https://www.cnblogs.com/lulight/p/18648660