ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Does DEVTEST JMS Virtual Service Support Message ID Based Correlation ?


Article ID: 140895


Updated On:


CLOUDTEST CA Application Test CA Cloud Test Mobile MOBILECLOUD Service Virtualization


Does JMS Virtual Service Support Message ID Based Correlation ?


Release : 10.5

Component : CA Service Virtualization


Answer: A Resounding  YES

Perhaps the biggest strength of DevTest is the depth of Message queue based Virtualization. Time and again, this is proven to be true by working with various customers with various requirements.

First things first, What is Message ID based correlation ?

Its a mechanism to match a request that comes from a particular queue to a corresponding response from another queue. The backend service does the following:

  •        Reads a message from a request queue¬∑    
  •        Makes a note of the JMS Message Id value of the request message, called it as MSGID (eg: 414d5120716d31202020202020202020136 bc95d20d54802)
  •      Puts a response message in the response queue and while doing so, it sets the CorrelationID JMS header value of the message with the value MSGID (eg: 414d5120716d31202020202020202020136bc95d20d54802)

With this kind of a mechanism, its very easy for a client to match a request with the correct response. Typically an asynchronous message selector is created on the response queue to listen to message that have the CorrelationID value same as that of the MessageID of request message object.

How to enable JMS Message ID Based Correlation for a Virtual Service ?

There are no specific pre-requisites for this. Just record and create your JMS Virtual Service Once the Virtual Service is created, just open the VSM file in Workstation and inspect the 'Respond' step. If you enable the 'Correlation scheme' and choose 'JMS Message ID to Correlation ID', then DevTest takes care of copying the value of JMS MessageID and set it to JMS Correlation ID of the response message. This was verified by playing around with this open and redeploying

few times. It works FLAWLESSLY.


5. How to verify if Message ID based Correlation Works in a Virtual Service?

First make sure you enable the Correlation Scheme as shown in the screenshot above

Deploy the virtual service

Send a request and receive a response in proxy request and response queues. Now, lets inspect the 'JMS Message ID' of Request Message an d 'JMS Correlation ID' of Response Message Checking Correlation ID of Response


 This is straight forward. From the JMS Send receive test case, check the response object and inspect JMS Headers. You would be able to easily locate the Correlation ID value. Just note it. In this case it is

"414d5120716d31202020202020202020136bc95d20d5e802" We expect this value to be same as that of JMS Message ID of corresponding request message.

Lets check it.

 To check the Request Message and its JMS Message ID, use the Portal; Go to the Virtual service -> Inspection View -> Locate the specific request -> choose 'Listen' step -> Check the value of 'lisa.vse.request' object 'Long Info' and you should see the JMS Message ID of request object here


Just note down the value of the property msg.messageid and it is "414d5120716d31202020202020202020136bc95d20d5e802" Comparing the 2 values side by side: 

Request object JMS Message ID: 414d5120716d31202020202020202020136bc95d20d5e802 

Response object JMS Correlation ID: 414d5120716d31202020202020202020136bc95d20d5e802