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 2018/11/28 09:18:48 UTC

[GitHub] davidpdw opened a new issue #566: Auto create topic question

davidpdw opened a new issue #566: Auto create topic question
URL: https://github.com/apache/rocketmq/issues/566
 
 
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
   broker端开启了自动创建Topic,生产端默认配置,首先发送一条消息,超过30s后在发送消息,只会在一个master节点上面创建topic,不会再所有master节点上面创建topic
   
   
   - What did you expect to see?
   
   所有master节点都会自动创建topic
   
   - What did you see instead?
   
   只有一个master节点有topic
   
   2. Please tell us about your environment:
   
   broker 4.3.0
   client 4.3.0
   3 namesrv  2 master 2 slave
   
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   
       分析自动创建topic源码发现,client第一次发送会根据AUTO_CREATE_TOPIC_KEY从namesrv拿到topicRouteInfo作为新创建topic的topicRouteInfo,而MQClientInstance里面每30s会拉取topic的topicRouteInfo最新信息并更新。
       异常情况1:Producer发送一条信息后关闭掉Producer,这个时候只有在一个broker上面有topic信息,下一次启动Producer发送消息的时候就会直接从NameSrv拿到最新的topicRouteInfo,这样就只能在一个master节点上面创建topic
       异常情况2:Producer发送一条信息后,这个时候只有在一个broker上面有topic信息,隔35s在发送一条信息,在这段时间内,已经完成MQClientInstance对Topic Route的更新,topicRouteInfo只会拉取到一个master节点,这样也只能在一个master节点上面创建topic
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services