Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: websocket issues #426

Merged
merged 2 commits into from
May 1, 2023
Merged

Fix: websocket issues #426

merged 2 commits into from
May 1, 2023

Commits on May 1, 2023

  1. Fix: avoid message ack exceptions in message WS

    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.
    odesenfans committed May 1, 2023
    Configuration menu
    Copy the full SHA
    447ed60 View commit details
    Browse the repository at this point in the history
  2. Fix: properly terminate websocket requests

    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 committed May 1, 2023
    Configuration menu
    Copy the full SHA
    885cf4f View commit details
    Browse the repository at this point in the history