Should remove replyHandlers or streamHandler from reply-queue when getReply times out
When using the getReply with the timeout functionality if the time out occurs then the handlers are not cleared and the same correlationId cannot be used with getReply.
The timeout logic is specified in Queue.getReply, but the logic of adding and removing the handler is inside reply-queue. If I'm not missing anything these are the options:
- expose a method from reply-queue in order to remove handlers
- Move the timeout logic inside reply-queue so it knows when a timeout occurred and knows when to remove the handler (not only onReply, but onTimeout as well)
- Somehow treat the timeout in order to trigger the onReply of reply-queue.
I'm in favor of solution number 2. Is there any other approach that I'm missing. In any case you can assign this to me.
P.S. Adding the relevant section from the documentation that covers the implementation (correlation-id) https://www.rabbitmq.com/tutorials/tutorial-six-javascript.html
Closing this as we couldn't reproduce. Timeout deletes handlers
Managed to reproduce it. The issue is when the service that provides the stream waits for a reply from a consumer that is down.