Announcement Announcement Module
Collapse
No announcement yet.
Default Time Out in ReplyMessageCorrelator Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default Time Out in ReplyMessageCorrelator

    In ReplyMessageCorrelator we have

    Code:
    	private volatile long defaultTimeout = 5000;
    so what happens when I'm doing a Request/Reply using the SimpleMessagingGateway.sendAndReceiveWithReplyMess ageCorrelator with a replyTimeOut = -1

    Code:
    		return (this.replyTimeout >= 0)
    				? this.replyMessageCorrelator.getReply(message.getHeaders().getId(), this.replyTimeout)
    				: this.replyMessageCorrelator.getReply(message.getHeaders().getId());
    I'm invoking the getReply without a timeout, but the method invoked

    Code:
    	public Message<?> getReply(Object correlationId) {
    		return this.getReply(correlationId, this.defaultTimeout);
    	}
    uses the default value of 5000 instead of -1, and in the end, in RetrievalBlockingMessageStore it makes a

    Code:
    			MessageHolder holder = (timeout < 0) ? queue.take() : queue.poll(timeout, TimeUnit.MILLISECONDS);
    poll() instead of a take().

    Is this the intended behaviour or is it a bug?

  • #2
    That is a bug. Thank you for tracking it down so precisely. If you don't mind, could you submit this as a JIRA issue?

    Thanks,
    Mark

    Comment


    • #3
      See http://jira.springframework.org/browse/INT-361.

      Comment


      • #4
        Thank you. I have set the issue's target to RC1.

        Comment

        Working...
        X