amsmota
Sep 5th, 2008, 08:43 AM
In ReplyMessageCorrelator we have
private volatile long defaultTimeout = 5000;
so what happens when I'm doing a Request/Reply using the SimpleMessagingGateway.sendAndReceiveWithReplyMess ageCorrelator with a replyTimeOut = -1
return (this.replyTimeout >= 0)
? this.replyMessageCorrelator.getReply(message.getHe aders().getId(), this.replyTimeout)
: this.replyMessageCorrelator.getReply(message.getHe aders().getId());
I'm invoking the getReply without a timeout, but the method invoked
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
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?
private volatile long defaultTimeout = 5000;
so what happens when I'm doing a Request/Reply using the SimpleMessagingGateway.sendAndReceiveWithReplyMess ageCorrelator with a replyTimeOut = -1
return (this.replyTimeout >= 0)
? this.replyMessageCorrelator.getReply(message.getHe aders().getId(), this.replyTimeout)
: this.replyMessageCorrelator.getReply(message.getHe aders().getId());
I'm invoking the getReply without a timeout, but the method invoked
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
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?