Message Event
The Event tab has the following fields.
Field |
Description |
Candidate Event Key |
Expression built from the data of the incoming file change event. This expression should evaluate to a string and it is compared to the "key" field of the activity’s input. If the Candidate Event Key and the activity’s key match, then the process accepts the incoming message. For example, you may have JMS Topic Publisher activity earlier in the process diagram and you are expecting a message in response to the sent message. You would place the JMSCorrelationID from the header of the incoming message into the Candidate Event Key field. You would then place the JMSMessageID from the header of the outgoing message earlier in the process in the "key" field on the input tab. This expression is specified in XPath, and only data from the incoming event is available for use in this XPath expression. For more information about XPath expressions, see TIBCO ActiveMatrix BusinessWorks™ Process Design. |
Event Timeout (msec) |
A message may arrive before this activity is executed. This field specifies the amount of time (in milliseconds) a message waits if it is received before this activity is executed. If the event timeout expires, an error is logged and the event is discarded. If no value is specified in this field, the message waits indefinitely. If zero is specified, the event is discarded immediately, unless this activity has already been reached. |
Using Wait for JMS Queue Message Activity in Multi-Engine Design
All "Wait for" activities start listening from the time the bwengine loads and can be configured to filter static data. These activities cannot filter dynamic data.
The activity pulls all the messages that are in the queue upon startup and processes them according to the Event key. Any messages that were picked up but do not match the key are discarded. A Wait for JMS Queue Message Activity cannot be used with the Candidate Event key as the key is applied after receiving the message from the queue.
In a multi-engine environment, when new messages arrive on the queue, the messages are dispatched among all active listeners in a round-robin fashion. Thus an engine may potentially pick up the message which was intended for some other engine, and later discard the message because of a mismatch in the Event key.
It is recommended that you use the Wait for JMS Queue Message activity with the Message Selector in a multi-engine mode. The Message Selector is applied while browsing the queue before picking up the messages.