Does Configuring Only One Broker Group Impact a RocketMQ 4.8.0 Instance?
Impact
For a RocketMQ 4.8.0 instance using only one group of brokers or whose topic is associated with only one group of brokers, a master/slave switchover is triggered when a broker is faulty. The switchover takes about 30s. If multiple groups are associated, production traffic can be automatically switched to an available group.
Solution
To address this issue in scenarios where only one group of brokers is configured:
- Scale out the instance to associate two or more groups of brokers.
- Migrate to a 5.x instance. Each 5.x instance flavor has multiple groups of brokers.
Shortening the Failover Time
- When only one group of brokers is configured, you can adjust the following producer and consumer parameters.
producer.setPollNameServerInterval(10000); consumer.setPollNameServerInterval(10000);
- When multiple groups of brokers are configured, you can enable the producer detection mechanism (available only on a Java 5.1.4 or later client) by adding the following code to shorten the failover time:
producer.setSendLatencyFaultEnable(true)
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.