Skip to content

Conversation

@odesenfans
Copy link
Collaborator

  • Avoid acknowledgement issues in message WS
  • Properly terminate requests to the message WS.

odesenfans added 2 commits May 1, 2023 18:16
Problem: when a large number of websockets are open simultaneously,
at some point a message acknowledgement is not performed and
the channel/connection gets closed by the RabbitMQ broker.

Solution: use the WS in no_ack mode, we do not benefit from
acknowledgements in this use case anyway.
Problem: Websocket requests to api/ws0/messages never terminate,
resulting in resources leaking (ex: RabbitMQ queues).

Solution: split the implementation in two tasks:
* the main task reads the websocket and expects a `close` message.
* the secondary task publishes messages from the RabbitMQ queue
  to the websocket.

Once a close event is detected, the main task cancels the secondary
task and deletes the queue.
@odesenfans odesenfans merged commit f8688d3 into master May 1, 2023
@odesenfans odesenfans deleted the od-fix-websockets branch May 1, 2023 21:33
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