Skip to content

feat: Add an option to control connection cleanup#392

Merged
BewareMyPower merged 1 commit intostreamnative:masterfrom
mezmo:issue_391
Feb 11, 2026
Merged

feat: Add an option to control connection cleanup#392
BewareMyPower merged 1 commit intostreamnative:masterfrom
mezmo:issue_391

Conversation

@darinspivey
Copy link
Contributor

The check_connections() function is responsible for cleaning up unused connections. Now that update_topics is periodically called for multi topics (partitions) as well as for topic regex, it's important that there be a cached connection to use. This commit makes changes to refresh a timestamp when a connection is used and only delete it after a certain configured idle time has passed. A configurable option has been added to give the user full control of the connection cleanup behavior.

Fixes: #391

The `check_connections()` function is responsible for cleaning up unused
connections. Now that `update_topics` is periodically called for `multi`
topics (partitions) as well as for topic regex, it's important that
there be a cached connection to use. This commit makes changes to
refresh a timestamp when a connection is used and only delete it after
a certain configured idle time has passed. A configurable option has
been added to give the user full control of the connection cleanup
behavior.

Fixes: streamnative#391
@darinspivey
Copy link
Contributor Author

@BewareMyPower this is a follow-up to my recent fix for the connection cleanup race condition. Thank you!

@BewareMyPower BewareMyPower merged commit 1740701 into streamnative:master Feb 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check_connections() is deleting connections that could be used by update_topics()

2 participants