Sunday 11 November 2018

Properties versus MQMD folder behavior

I had a REST API message flow where I needed to backup the JSON payload to WebSphere MQ queue. I needed to set the expiry interval on the message.

My message was sourced from an HTTPInput node. This meant that I could not directly set the expiry by simply using the following ESQL statement:-

SET OutputRoot.MQMD.Expiry = '7899100';

The above statement would not have worked since my message was sourced by an HTTPInput message, no MQMQ tree existed.

When a message flow is sourced by an MQInput node there is an MQMD to parse which makes it easy to set the Expiry value.

  1. When your message flow is sourced by an MQInput node, the MQMD takes precedence over the Properties folder in terms of value propagation between the folders.
  2. When your message flow is sourced from an input node that is not the MQInput node (such as the HTTPInput node or a user-defined input node), the MQMD header does not take precedence over Properties folder .
  3. When an MQMD folder is added in a tree that was created by the HTTP Transport, this MQMD does not have control over the Properties folder and the value propagation direction is not MQMD to Properties; it is Properties to MQMD - source IBM Integration Bus Information Center.
To set the message expiry I set both the Properties.ExpirationTime and MQMD.Expiry.

SET OutputRoot.Properties.ExpirationTime = 6048000;
SET OutputRoot.MQMD.Expiry= 6048000;






2 comments:

  1. HI, In the "SET OutputRoot.Properties.ExpirationTime = 6048000;" what does 6048000 means? is it a time in milliseconds or seconds?

    ReplyDelete
  2. The time is expressed in tenths of a second
    e.g. 1 second = 10

    ReplyDelete