Results 1 to 4 of 4

Thread: Default Time Out in ReplyMessageCorrelator

  1. #1
    Join Date
    Feb 2008
    Location
    Dublin - Ireland
    Posts
    102

    Default 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. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    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

  3. #3
    Join Date
    Feb 2008
    Location
    Dublin - Ireland
    Posts
    102

  4. #4
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •