User properties not saved in message - Websphere

This is a discussion on User properties not saved in message - Websphere ; Hello. I'm using WebSphere MQ 5, put/get messages in MQ format (not JMS format). I set several properties to the message, like this: theMessage.setStringProperty("abc", "abcVal"); After I send message: theSender.send(theMessage); the property is still available: theMessage.getStringProperty("abc") returns correct value. But ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: User properties not saved in message

  1. User properties not saved in message

    Hello.

    I'm using WebSphere MQ 5, put/get messages in MQ format (not JMS format).

    I set several properties to the message, like this:

    theMessage.setStringProperty("abc", "abcVal");


    After I send message:

    theSender.send(theMessage);

    the property is still available:

    theMessage.getStringProperty("abc")

    returns correct value.

    But if I browse messages viq QueueBrowser, none of my properties is set at the message. The message contains only JMS* and JMSX* properties. Whereas if I set JMSCorrelationID or JMSXGroupID properties, thay are not lost and have correct values.

    Why the user properties are lost? Can it be related to message format, i.e. MQ format (unlike JMS format)?
    Or this is normal behaviour and user properties do never persist? If so, then what is the reason to have user properties?


  2. Re: User properties not saved in message

    botsman5@tut.by wrote:
    > Why the user properties are lost? Can it be related to message format, i.e. MQ format (unlike JMS format)?


    "MQ Format" in this case means that the message contains an MQRFH header, which
    isn't capable of containing user properties. "JMS Format" means your message
    contains an MQRFH2 header, which is capable of containing user properties;
    however, non-JMS/XMS applications have more difficulty dealing with MQRFH2
    headers than MQRFH headers.

    Hope this helps,

    Phil
    --
    XMS Client Development

+ Reply to Thread