Configuring a RocketMQ Client
Suggestions on configuring a RocketMQ client.
Java Client Version
5.1.4 and later are recommended.
Unique ClientId
By default, ClientId combines the process ID, local IP address, and instance name. When two consumers in a consumer group are started in a process, their ClientIds are the same. As a result, some queues are repeatedly consumed and others cannot be consumed.
Recommended Setting
producer.setInstanceName(String.valueOf(System.nanoTime()))
Producer Exception Detection
Available in Java client 5.1.4 and later.
Enable exception detection on a client. When accessing a broker times out, the client can quickly switch to another broker for message production.
producer.setSendLatencyFaultEnable(true)
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot