Skip to content

Conversation

@odesenfans
Copy link
Collaborator

Problem: RabbitMQ queues can stay open indefinitely if the websocket filters only match few or no message. This can lead to increased resource consumption.

Solution: add a large timeout (5 minutes) and check periodically if the websocket connection is still open. If the user is still listening, keep the queue open. Otherwise, delete the queue and terminate the request.

@odesenfans odesenfans marked this pull request as draft April 28, 2023 10:29
@odesenfans
Copy link
Collaborator Author

This is not enough yet, the timeout does work but ws.closed does not detect if the websocket was closed. We need to read from the websocket to determine if the connection is still open.

Problem: RabbitMQ queues can stay open indefinitely if the websocket
filters only match few or no message. This can lead to increased
resource consumption.

Solution: add a large timeout (5 minutes) and check periodically
if the websocket connection is still open. If the user is still
listening, keep the queue open. Otherwise, delete the queue and
terminate the request.
@odesenfans odesenfans force-pushed the od-terminate-message-ws-on-connection-closed branch from 215a906 to c064b1b Compare April 28, 2023 11:05
@odesenfans odesenfans closed this May 1, 2023
@odesenfans odesenfans deleted the od-terminate-message-ws-on-connection-closed branch May 1, 2023 21:19
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.

2 participants