Customizing MQ Messages

You can customize MQ Message by adding values to existing messages. You must have a valid MQ Native Queue configured before proceeding.
gateway90
You can customize MQ Message by adding values to existing messages. You must have a valid MQ Native Queue configured before proceeding.
The diagram below illustrates the process of configured messages passing through the descriptor, message properties, and headers.
 
Message_Passthrough
Message_Passthrough
The sequence of applying the values is important. Below is a general sequence for each section.
1
Message Descriptors
  1. Passes through all message descriptors
  2. Manage Transport Properties/Headers assertion
  3. Customized message descriptors in the Route via MQ Native assertion
2
  Message Properties
  1. Pass through
  2. Copy to Properties
  3. Manage Transport Properties/Headers assertion
3
 Message Additional Headers
  1. Pass through
  2. Copy to Additional Headers
  3. Manage Transport Properties/Headers assertion
Customizing MQ Message Descriptors
To access the message descriptors
:
  1. Add the Route via MQ Native assertion in the policy window and select
    MQ Native Routing Properties
    or double-click the assertion in the policy window.
  2. In the [
    Request
    ] and [
    Response
    ] tabs, select the
    Pass through all MQ message headers
    check box. The value of the descriptor from the original MQ message will be passed to the message result.
  3. Go to either the [
    Request
    ] or [
    Response
    ] tabs and view the "Customize message descriptors" section. 
  4. Configure the message descriptors as follows:
    To...
    Do this...
    Add a new message descriptor
    1. Click [
      Add
      ].
    2. See "Adding a New Message Descriptor" below for more information.
    3. Click [
      OK
      ] when done
    Edit a new message descriptor
    1. Select the item to edit.
    2. Click [
      Edit
      ] and then modify the values as required.
    3. Click [
      OK
      ] when done
    Remove a new message descriptor
    1. Select the item to remove.
    2. Click [
      Remove
      ].
    3. Click [
      OK
      ] to confirm the deletion.
Adding a New Message Descriptor
  1. Choose the name of the message descriptor from the “Name” drop-down list. By default, only the descriptors visible in the list can be used.
    If you wish to use MQ message descriptors not shown in the list, set the cluster property 
    io.mqRoutingSetAllContext
     to “true”. This will allow you to specify message descriptors not visible in the list. To do this, type in the descriptor name in the “Name” field.
    Note that the following message descriptors cannot be set, even when the cluster property is set to “true”:
    • backoutCount
    • messageSequenceNumber
    • originalLength
  2. Enter the value of the message descriptor in the "Value" field. You may reference a context variable.
  3. Click [
    OK
    ].
Alternatively, you can use the Manage Transport Properties/Headers Assertion to customize the message descriptor.