book
Article ID: KB0090890
calendar_today
Updated On:
Description
Resolution:
The "Get JMS Queue Message" activity uses the pull mechanism to receive messages from the JMS server. So if there is a message in the queue, it will be received immediately. If there is no message, this activity will wait for a message to arrive at the queue or timeout, whichever occurs first. It is not a good idea to set timeout to 0 or blank, else this activity will wait indefinitely until a message arrives at the queue. The "Wait for JMS Queue Message" activity works in passive mode. It is notified once a message arrives on the specified queue.
Another difference is on the number of message these activities can process. Suppose the Message Selector is not used, when bw engine starts up the "Get JMS Queue Message" activity in this engine receives only one message from queue, but the "Wait for JMS Queue Message" activity consumes all messages from the queue.
Example usage of the "Wait for JMS Queue Message" activity could be that when you send out a request to a request queue and then expect a response from a response queue. In this case, you can use Candidate Event Key and Key fields to get the correct response message from response queue.
KEYWORDS:GET JMS QUEUE MESSAGE,WAIT FOR JMS QUEUE MESSAGE, DIFFERENCE
Issue/Introduction
Difference between Get JMS Queue Message activity and Wait for JMS Queue message activity