Skip to content

Close ZeroMQ resources during broker shutdown - #707

Open
IlyaKhalafi wants to merge 1 commit into
taskiq-python:masterfrom
IlyaKhalafi:fix/zmq-shutdown-resources
Open

IlyaKhalafi wants to merge 1 commit into
taskiq-python:masterfrom
IlyaKhalafi:fix/zmq-shutdown-resources

Conversation

@IlyaKhalafi

Copy link
Copy Markdown

This PR fixes ZeroMQ brokers leaving their socket and context open after shutdown. With this, resources close even if a shutdown hook or the result backend fails, and the broker can still be started again afterwards.

Sockets close with linger set to zero, so outgoing messages that have not been flushed may be dropped at shutdown.

All 382 tests and the pre-commit checks pass, including nine real-socket cleanup and restart tests. A local TCP stress check with an unread subscriber also passed five runs.

Fixes #706

This branch has not been deployed

No deployments
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.

ZeroMQ broker shutdown leaves sockets and context open

1 participant