You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Ubuntu 22.04.2 LTS
RocketMQ version
5.1.0
JDK Version
1.8
Describe the Bug
Client does not send heartbeats to all Nameserve in clustered mode, resulting in frequent disconnections
Clients are timed to establish connections with all Nameserve
The client does not send a heartbeat to Nameserve regularly, but the client sets up idle read/write detection
The client will only get the topic metadata from one Nameserve at regular intervals, which can be treated as similar to a heartbeat, but in cluster mode, it will only get the metadata from a single Nameserve, which leads to frequent disconnections and reconnections of other Nameserves.
Steps to Reproduce
publicclassLocalProducer {
/** * The number of produced messages. */publicstaticfinalintMESSAGE_COUNT = 100;
publicstaticfinalStringPRODUCER_GROUP = "xiao-zou-topic-producer";
publicstaticfinalStringDEFAULT_NAMESRVADDR = "127.0.0.1:9000;127.0.0.1:9001;127.0.0.1:9002";
publicstaticfinalStringTOPIC = "xiao-zou-topic";
publicstaticfinalStringTAG = "TagA";
privatestaticfinalLoglog = LogFactory.getLog(LocalProducer.class);
publicstaticvoidmain(String[] args) throwsMQClientException, InterruptedException {
/* * Instantiate with a producer group name. */DefaultMQProducerproducer = newDefaultMQProducer(PRODUCER_GROUP, true);
producer.setNamesrvAddr(DEFAULT_NAMESRVADDR);
producer.addRetryResponseCode(RemotingSysResponseCode.SYSTEM_BUSY);
producer.start();
for (inti = 0; i < MESSAGE_COUNT; i++) {
try {
Messagemsg = newMessage(TOPIC/* Topic */,
TAG/* Tag */,
("Hello xiaozou " + i).getBytes(RemotingHelper.DEFAULT_CHARSET) /* Message body */
);
// msg.setDelayTimeLevel(2);SendResultsendResult = producer.send(msg, 5000);
DateTimeFormatterdtf2 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
System.out.printf("%s %s%n", sendResult, dtf2.format(LocalDateTime.now()));
TimeUnit.SECONDS.sleep(20);
} catch (Exceptione) {
e.printStackTrace();
Thread.sleep(1000);
}
}
producer.shutdown();
}
}
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
Ubuntu 22.04.2 LTS
RocketMQ version
5.1.0
JDK Version
1.8
Describe the Bug
Client does not send heartbeats to all Nameserve in clustered mode, resulting in frequent disconnections
Clients are timed to establish connections with all Nameserve
The client does not send a heartbeat to Nameserve regularly, but the client sets up idle read/write detection
The client will only get the topic metadata from one Nameserve at regular intervals, which can be treated as similar to a heartbeat, but in cluster mode, it will only get the metadata from a single Nameserve, which leads to frequent disconnections and reconnections of other Nameserves.
Steps to Reproduce
What Did You Expect to See?
no error: NETTY CLIENT PIPELINE: IDLE exception
What Did You See Instead?
NETTY CLIENT PIPELINE: IDLE exception [127.0.0.1:9000]
Additional Context
No response
The text was updated successfully, but these errors were encountered: