You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yaowenbinqwq (via GitHub)" <gi...@apache.org> on 2023/06/09 01:46:25 UTC
[GitHub] [rocketmq] yaowenbinqwq commented on issue #6810: [Bug] with the same clientId, the groupChannelTable in ProducerManager has data, but the clientChannelTable does not
yaowenbinqwq commented on issue #6810:
URL: https://github.com/apache/rocketmq/issues/6810#issuecomment-1583810051
ProducerManager's `ConcurrentHashMap<String /* group name */, ConcurrentHashMap<**Channel**, ClientChannelInfo>>`. using Channel as Key to maintain ClientChannelInfo in same group, instead of ClientId.
So If you register different clientId **but same channel**. ProducerManager#registerProducer() will only update the lastUpdateTimestamp. instead of create new ClientChannelInfo for newer ClientId and override old.
ProducerManager中`ConcurrentHashMap<String /* group name */, ConcurrentHashMap<**Channel**, ClientChannelInfo>>`。使用了Channel类作为Key来维护ClientChannelInfo,而不是String类型的ClientId。
所以,如果注册了两个不同的ClientID,但是**Channel是相同的**话,那么`ProducerManager#registerProducer()`方法将只会更新该Channel的最后更新时间戳,而不是为新注册的ClientID创建一个新的ClientChannelInfo并且覆盖旧的Client。
--
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.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org