Using a Process Conversation to Correlate JMS Message Jobs
JMS client and server processes correlate with each other by sending and receiving JMS messages through the process conversation mechanism.
Prerequisites
Use TIBCO ActiveMatrix BusinessWorks™ 6.x server. However, if you want to run ActiveMatrix BusinessWorks™ 5.x server, install ActiveMatrix BusinessWorks 5.x.
TIBCO Enterprise Message Service must be running.
Procedure
Result
On UNIX, you can also verify the expected result by tailing the client output to the file /tmp/MultiJobsCorrelation/MultiJobsCorrelation.log.
The
MultiJobsCorrelation.log at the
C:\tmp\MultiJobsCorrelation location shows requests 1 to 10 when sent in order with the corresponding correlation IDs. The server response is received out of order and the runtime engine correlates each reply to the corresponding request correctly. You see the following output.
Understanding the Configuration
A conversation is configured with an Initiator and a Joiner. Click the WaitForServerReply activity (a JMS Signal-In activity).
Click the Conversations tab. In this case, WaitForServerReply is both the Initiator and Joiner for this conversation.
The WaitForServerReply activity's Initiate action is configured with $ReceiveLaunchMsg/JMSHeader/ns:JMSCorrelationID where SendRequestToServer activity Input is also configured with the same JMSCorrelationID. See the following.
The reason for this configuration is on the ActiveMatrix BusinessWorks 5.x JMSServerProcess side. The Reply To Client activity is configured to send back the same JMSCorrelationID, for the Reply to match with the correct Server Request job.