absolute8511 commented on issue #9145: URL: https://github.com/apache/rocketmq/issues/9145#issuecomment-2820224243
这个 bug 一直存在,在 simpleconsumer 里面,receiveMessage 并不会指定所有 broker 去 pop 消息,导致在某一个 broker 没有消息时,会被服务端的 longpolling 阻塞等待一段时间才返回,从而无法及时消费其他 broker 的数据。 PushConsumer 之所以不会出现,是因为会根据返回的 queue 信息,每个 queue+broker 都会启动一个独立的 receive 线程获取指定的 queue 数据。 由于 SimpleConsumer 并没有暴露底层的 receive 接口指定 broker 参数,所以也做不到每个 broker 使用独立的线程获取消息,那么必然会出现这种一个 broker 没有消息导致其他 broker 消息不能及时消费的问题。 在消息量较少,或者使用 hash 只发给部分 broker 的情况下会更加严重。 -- 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]
