Setting custom headers in JMS MQ Messages
search cancel

Setting custom headers in JMS MQ Messages


Article ID: 15976


Updated On:


CA Application Test CA Continuous Application Insight (PathFinder) Service Virtualization


This article will provide information on adding custom headers in JMS Send Receive step.

How to send custom headers in JMS MQ Messages?


DevTest versions, which support new "JMS Send Receive" step.




Refer to section "Third-Party File Requirements" and choose the "WebSphere MQ File Requirements" link in the documentation of the DevTest release you are running.

First, need to add the IBM MQ jars to DevTest_Home/lib/shared folder.  

We are adding custom headers to MQ messages which are using JMS Mode, so need to have javax.jms-api-2.0.jar to the DevTest_Home/lib/shared folder also. The javax.jms-api-2.0.jar can be downloaded from

After adding the MQ jars, start the Workstation and configure JMS assets in project.config and verify it. 

Once the JMS configuration is verified, create a test case and add a "JMS Send Receive" step and configure the custom properties as below:

1 Click on the "PRO" icon in the top right corner of the "JMS Send Receive" step.

2. In the JMS Send section click on the Custom Properties-->Open Editor, which opens custom properties window.

3. Click on the "+" and select the type of the custom property to be added and then add it and click "OK".

4. Add the message data in the "Content" section and save the test.

5. Click the green arrow "->" on the top right corner and verify the Request-->headers. Headers should show what is added in the Custom properties. 


Additional Information

Need the below jars for MQ:







. connector.jar

. dhbcore.jar

. javax.jms-api-2.0.jar (if you are using WebSphere MQ in JMS mode)




1558717177897000015976_sktwi1f5rjvs16ugz.png get_app
1558717176026000015976_sktwi1f5rjvs16ugy.png get_app
1558717174032000015976_sktwi1f5rjvs16ugx.png get_app
1558717172320000015976_sktwi1f5rjvs16ugw.png get_app