JMS synchronous communication
In the following this, there is code for a basic JMS synchronous receiver.
The question I have is this: When a message is delive开发者_Go百科red to the queue, because it is synchronous, it will automatically be available via the receiver.receive
method. Is this correct?
If this is so, then after msg1
arrives on queue, while we are still processing receiver.receive()
. what happens if msg2
arrives on queue.
since the call receiver.receive()
has not returned, will it be able to still receive the message # 2?
msg2
will remain on the queue until another consumer calls receive()
.
精彩评论