Question

I would like some pointers of best practice. I need to wait for a binding to complete before polling for data through it, and much of this happens in parallell all the way back to the client. But if there is already a binding operation in progress, issuing another one will replace the callback.

If I would like to patch node-amqp to support a separate callback for each binding operation, how would I proceed?

Was it helpful?

Solution

The short answer is that this is not possible in node-amqp. If you call bind on a queue that already has a binding operation in progress, the callback will be replaced. So only one callback will be called for concurrent bindings on the same queue, namely the last one passed.

For this reason, and others, I have switched to using amqp-coffee which handles the binding callback differently.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top