rabbit-queue icon indicating copy to clipboard operation
rabbit-queue copied to clipboard

Should remove replyHandlers or streamHandler from reply-queue when getReply times out

Open nikostoulas opened this issue 6 years ago • 3 comments

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.

nikostoulas avatar Oct 04 '19 12:10 nikostoulas

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:

  1. expose a method from reply-queue in order to remove handlers
  2. 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)
  3. 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

alkiskal avatar Mar 30 '20 17:03 alkiskal

Closing this as we couldn't reproduce. Timeout deletes handlers

nikostoulas avatar Mar 31 '20 07:03 nikostoulas

Managed to reproduce it. The issue is when the service that provides the stream waits for a reply from a consumer that is down.

nikostoulas avatar Jun 18 '20 10:06 nikostoulas