920799648 commented on issue #6810:
URL: https://github.com/apache/rocketmq/issues/6810#issuecomment-1587404026

   > 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。
   
   
不好意思,可能之前表达的不是很清楚,同一个channel在groupChannelTable中可以查询到数据,导致不会再塞入clientChannelTable中,只更新时间,实际上clientChannelTable
 变量中已经没有这个channel 的数据,导致 调用ProducerManager#findChannel方法提示push reply message 
fail, channel of <XXXXX@599#20869074073> not found. BROKER: 
XXX:10911(pushReplyResult.setRemark("push reply message fail, channel of <" + 
senderId + "> not found."))


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to