when ServerCnx has no consumers and producers, recycle the connection
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
**Is your feature request related to a problem? Please describe.**
now, we sometimes meet this issue
our users use an old version of the client, for example, backlog exceeded.
the client will close the producer, but they won't close the connection, then the TCP connection will increase very quickly.
we can think of another scene: if the user creates a pulsar client, then create a producer,then close producer, then create a pulsar client.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
we want to use a brokerDeleteInactiveConnectionEnabled config, when we close producer and close consumer when will judge
if the current Servercnx has no consumer and producer, we will register a timer (such as 60s), if there is no consumer and producer after 60s,we will close cnx.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Contributor guide
Research direction
Start by tracing ServerCnx handling when producers and consumers are closed, then locate the brokerDeleteInactiveConnectionEnabled configuration and any existing connection timers. Done means an enabled broker closes a ServerCnx only after it has had no consumers or producers for the configured delay, while active connections remain open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100