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
可以这样做
msg.SetStringProperty("NicksProp", "blahblah");
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.