Closed sN0wpeak closed 2 years ago
This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.
This issue was closed because it has been inactive for 3 days since being marked as stale.
BUG REPORT
https://github.com/apache/rocketmq/blob/39bb9386f10d5d8dfe81183c172a3a86f6d313bd/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java#L256
https://github.com/apache/rocketmq/blob/39bb9386f10d5d8dfe81183c172a3a86f6d313bd/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java#L107
https://github.com/apache/rocketmq/blob/9f95a972e10e0681bc3f2d00e9957aa212e897b5/client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java#L216
MQClientInstance creates a ScheduledExecutorService(just one thread) to execute 5 functions serially, the persistAllConsumerOffset persist ConsumerOffset to broker with 5-sec timeout.
In k8s, IP to change when Broker restart. If MQClientInstance is calling persistAllConsumerOffset that time causes cost 50 * 5 sec and not call updateTopicRouteInfoFromNameServer. Because the old Broker IP is unavailable.
5 minutes later, The consumer is starting to consume until updateTopicRouteInfoFromNameServer is call.
What did you expect to see? Is there any solution to this question besides using a different InstaceName?
What did you see instead?