apache / apache/rocketmq

[Bug] Client message sending timeout

Open
#10,289 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
2d 20h
Merged PRs (30d)
26

Description

### Before Creating the Bug Report

- [x] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).

- [x] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate.

- [x] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

### Runtime platform environment

centos7

### RocketMQ version

4.x、5.x

### JDK Version

jdk8

### Describe the Bug

When the client enables the VIP port function (vipChannelEnabled=true), the client always sends heartbeats to the broker's non VIP port, while other operations (such as message sending ) use the VIP port. This results in the connection to the VIP port not having heartbeat maintenance, being considered idle by the broker and closed. At the same time, any message sent will timeout due to the connection being closed.

### Steps to Reproduce

producer.setVipChannelEnabled(true);

Send a message every 2 minutes

### What Did You Expect to See?

When the VIP port function is enabled, the heartbeat should also be sent to the VIP port to maintain the active connection status of the VIP port and avoid message sending timeout caused by idle connection closure.

### What Did You See Instead?

Even if the client uses the VIP port, heartbeats always use the non-VIP port, resulting in the following issues:
No heartbeat maintenance for connections on the VIP port
The broker closes VIP port connections as it regards them as idle
The client encounters a timeout error when sending messages at the moment the connection is closed

broker:close the connection
Image

producer: is sending a message but timeout

Image

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Java client connection and heartbeat paths when vipChannelEnabled=true, then reproduce the issue by sending a message every two minutes on CentOS 7 with JDK 8. Confirm that heartbeats use the VIP connection and that the broker no longer closes it before the next message, eliminating the send timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.