Reputation: 839
I am reading an MQMessage in like so
queue.Get(message, gmo);
string message1 = message.ReadString(message.MessageLength);
I can see there is a message.UserId on MQMessage
, but that is not enough
I want the users to get additional information in the message header of an MQMessage.
How can I set and then retrieve the following from a header of an MQMessage
username
password
mySpecialID
Upvotes: 2
Views: 1461
Reputation: 7506
Note: MQ treats message properties as plain text, so if you are sending a password as a message property then EVERYONE can see it. You will be able to see it via WireShark, and/or in the queue with any tool (MQ Explorer) and/or in the MQ log files.
Upvotes: 1
Reputation: 839
This can be done like this
msg.SetStringProperty("NicksProp", "blahblah");
Upvotes: 1