Sending Messages In Order

4 Comments

  • Joey
    Comment actions Permalink

    Hi Alex-

    I reached out to the developers of this product for some more input, we'll be back in touch soon!

    0
  • Jay
    Comment actions Permalink

    Hi Alex,

    > The problem is that success messages returned by the websocket server don't indicate channelId. You also can't encode channelId within the request ID because channelID is a scalar in the graphql documentation, and thus isn't guaranteed to be a number, while requestId is. This makes popping from the queues of specific channels impossible.

    Have you tried to maintain a map (requestId -> channelId)?
    So when a sendMessage response arrives with requestId, we can get the corresponding channelId from the map and pop the message from that channel queue.

    Regards,
    Jay

    0
  • Alex
    Comment actions Permalink

    Hi Jay,

    Thanks for the suggestion! I guess I could use autoincrement or a uuid. Are there any limitations to the size of the number for request ID?

     

    0
  • Jay
    Comment actions Permalink

    Hi Alex,

    Sorry for the late response. 

    Request ID could be up to 253 - 1. It should be good enough. If you want to be extra safe, you could define a soft limit (e.g. 10,000,000) and reset the request ID to 0 when the soft limit is reached. 

    Hope it helps!
    Jay

    0

Please sign in to leave a comment.

Powered by Zendesk