rabbus icon indicating copy to clipboard operation
rabbus copied to clipboard

Question Regarding Receiving Messages

Open b3tts32 opened this issue 7 years ago • 0 comments

I'm going through your library and it's worked great going through the demos. I'm looking at a use case for receiving multiple messages.

The use case would be I would provide an api (express routes) that allows various applications to publish to and retrieve messages at their convenience. Publishing messages isn't an issue, but the questions come up on the receiving end. Ideally I'd provide the express endpoint and I'd receive all messages in the queue and use the body/array as the response. What I've seen is I can create a listener to get messages on demand, or consume and get messages one at a time. Would I need to loop through and get all the messages? Or is there a better method to retrieve all messages and return them from the queue?

b3tts32 avatar Jun 21 '17 14:06 b3tts32