nodejs-pubsub icon indicating copy to clipboard operation
nodejs-pubsub copied to clipboard

feat: add async helper for ordered async processing of messages

Open feywind opened this issue 1 year ago • 0 comments

Adds an AsyncHelper class to the Node Pub/Sub library that helps to process messages in order even with an async handler. For ordering queues especially, it was problematic to try to handle the case of ordered messages coming in and being processed by async code; async uses Promises, and these are basically always guaranteed not to be processed inline. This helper queues messages from the stream.on handler and lets each process before starting the next.

feywind avatar Oct 23 '24 20:10 feywind