apache / apache/eventmesh

[Bug] Sending heartbeat msg without a return value resulted in session expiration

Open
#4,760 7 comments 0 reactions 0 assignees View on GitHub
bug need research Stale
Dominant language
Java
Stars
1.8k
Forks
658
Avg merge
11h 29m
Merged PRs (30d)
52

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.

### Environment

Windows

### EventMesh version

1.2.0

### What happened

After the client subscribes to the message [TCP], asynchronous [thread pool with 5 threads] reads the message and sleeps for 5 minutes. The server pushes a large number of messages;

Problem: Heartbeat heartbeat, unable to send to the server, resulting in session timeout being cleared;

### How to reproduce

1. Subscribe to a topic, and then sleep for 5 minutes after receiving the message;

2. Send 1000 messages to the topic

### Debug logs

```Java
2024-01-29 19:00:13.970 WARN 123056 --- [ientScheduler-4] o.a.e.c.tcp.impl.SimpleSubClientImpl : <=heartbeat=>group:test_1_count_g ,isActive:true ,address:/10.19.239.145:63610 ,error:operation timeout, context.key=4613632557
```

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) *

Contributor guide

Open the contributing guide

Research direction

Start at the SimpleSubClientImpl heartbeat path shown in the debug log and reproduce the TCP subscription scenario with five-minute sleeps and 1,000 messages. Trace why the heartbeat cannot be sent while message handling is busy; done means heartbeats continue reaching the server and the session remains active under this load.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.