Adding JMS or MQ/JMS Custom Header Attributes

If you need to add a custom header to your JMS (default messaging) or MQ/JMS message in WebSphere , you have two options. You can specify it as a custom header on the import component in the assembly diagram, or you can use a Medation Module.

You can add the custom header property in the assembly diagram by: Clicking the MQ/JMS Import Component. Click the Method binding in the propreties view. Scroll to the Custom Header table and add the name/value pair. It should be noted that you can only do this for static values. If you need to assign the value of your custom property based on the data from your Business Object, you MUST use a Mediation Flow. Sadly, the ‘Value’ column is not an XPATH expression like it should be.

To do this in a mediation module, you do your normal modification of the /header, nothing special.

Author: dan


  1. Dan,

    Can you add Custom Headers in Soap over JMS ?
    If so, where can I find an example about this.

    I like to use it, to filter out published messages, post to a topic?



  2. Hi Bernard,

    In my humblest of humble opinions, SOAP/JMS support is flaky at best and you’d be far better off staying away from it and using JMS Text messages.

  3. Hi Dan,

    Can we add some custom header properties to the jms message to post it to the required topic. This topic is not the one configured in the import binding?


  4. I need to set JMS header ( user defined) properties, in simple module having web service binding with WS, SOAP/JMS.

    How can i achieve this ?

  5. Hi Dan –
    I am trying to read a message from IBM WMQ using SOAP/JMS and it complains that the targetService property is not found on the message .

    I was using a normal JAVA client to write into the Queue but doesn’t seem to be working . Any idea if I write into the Queue , by using an MQ / MQ/JMS import and adding the targetService as a custom property , I would be able to see it when I read from the Queue ?

Leave a Reply

Your email address will not be published. Required fields are marked *