문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top