• 1 reply
  • Latest Post - ‏2017-06-12T14:32:13Z by fjb_saper
3 Posts

Pinned topic Adding and retrieving custom properties to MQ

‏2017-06-08T20:48:10Z | c# jmsheader mq mqget mqput
I am bit new to the whole MQ world so I am not sure about the specific technicalities.

I am struggling to send a message on a Websphere Mq with additional data; the additional data will then be used by another system for processing.


I am using the following code to do add additional properties to the mq; is this the correct way to do it?

IMessage sendMsg;

IMessageProducer producer;

// Create a message ---someMessage will be a xml file
sendMsg = new IMessage(someMessage);

int fileSize= size("document.pdf"); 

//add addtional message properties

// Send the message


Also, how do i query the mq so that I get all these properties along with the actual message?


Can anyone please help; this has got me going round in circles....

  • fjb_saper
    240 Posts

    Re: Adding and retrieving custom properties to MQ


    Look at the queues open properties and the GMO options you are passing on the GET. Use MQGMO_PROPERTIES_IN_HANDLE ... then you should be able to enumerate the properties on the message.