Currently 'late', or 'extra' replies in sendAndReceive are silently dropped.
There are two categories of late replies:
the sender already timed out on the receive
the sender caught an exception and will never execute receive()
In the second case the thread might have exited sendAndReceive or it might be waiting on a receive() in a new replyChannel after sending to the error channel.
In addition, 'extra' replies are simply ignored (if the sender already received a reply).
In the referenced forum post, the 'extra' reply received after the gateway had already processed an ErrorMessage was just ignored because the result was sent to the original reply channel.
Add WARN log entries when any of these conditions arise, to assist in debugging these situations.
Gary Russell opened INT-3004 and commented
Currently 'late', or 'extra' replies in
sendAndReceive
are silently dropped.There are two categories of late replies:
In the second case the thread might have exited
sendAndReceive
or it might be waiting on areceive()
in a new replyChannel after sending to the error channel.In addition, 'extra' replies are simply ignored (if the sender already received a reply).
In the referenced forum post, the 'extra' reply received after the gateway had already processed an
ErrorMessage
was just ignored because the result was sent to the original reply channel.Add
WARN
log entries when any of these conditions arise, to assist in debugging these situations.Reference URL: http://forum.springsource.org/showthread.php?136732-In-my-example-how-to-handle-errors-with-agregator
Issue Links:
Race Condition in MessagingTemplate.TemporaryReplyChannel [INT-3227] #7202 Race Condition in MessagingTemplate.TemporaryReplyChannel
Consider Making the WARN Logs in INT-3004 Fatal [INT-3005] #6980 Consider Making the WARN Logs in MessagingTemplate: Emit WARN Log Message When Late Replies are Sent [INT-3004] #6979 Fatal
The text was updated successfully, but these errors were encountered: