-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trace topic's routeInfoData can never be updated #1007
Comments
我发现路由自动更新的逻辑是有的, 可以试试是否生效。
|
RMQ_SYS_TRACE_TOPIC 这个topic没有经过tryToFindTopicPublishInfo这个过程,trace的发送过程是这样
这里的findmq是不会将RMQ_SYS_TRACE_TOPIC加入publishInfo,所以不会自动被client执行UpdatePublishInfo |
分析完全正确, 这里是bug,非常欢迎你提个PR修复这个问题。 正常的producer在生产的时候会把自己注册到client的producerMap中,在第一次发送的时候,会拉取路由,更新在producerMap对应实例的路由信息。 以后是由定时任务检查client.producerMap中每个生产者的topic的路由信息。 traceDispatcher在初始化的时候,并没有初始化生产者, 注册生产者到producerMap。这样定时任务检查路由的机制是存在的,但是没有topic需要检查。 处理办法:仿照java的逻辑, 初始化一个真正的producer来发送trace信息, 而不是直接调用通信层的invokeSync。这样每个producer的全部topic可以正常更新路由。 java的trace producer: |
hi,您好,我尝试修复了这个bug,辛苦review PR,第一次参与该项目有不规范的地方请指出 |
BUG REPORT
Please describe the issue you observed:
What did you do (The steps to reproduce)?
I disable write permission for a broker.
What did you expect to see?
All queues belong to this broker are not allowed to write.
What did you see instead?
queues belongs to topic RMQ_SYS_TRACE_TOPIC still emit messages to this broker.
I read trace.go code for a while and found that routeInfoData for topic RMQ_SYS_TRACE_TOPIC will never update since first boot;
Maybe we should add a timer to process UpdateTopicRouteInfo job every several seconds
The text was updated successfully, but these errors were encountered: