I read the messages from one queue to another queue. However my correlation ids are not preserved.
If the correlation id is "ABC12345" for a message in the import queue, when i put it into the export queue, the value of the correlation id is different.
How do i keep the same correlation id between the 2 queues and always have a unique message id?
Get:
mqQueue.Get(mqMsg);
string messageID = Convert.ToString(mqMsg.MessageId);
string correlationID = Convert.ToString(mqMsg.CorrelationId);
If for example if the correlation id is "000123456789", then after read, while putting it back , the value gets changed for the same message.
Put:
mqMsg.CorrelationId = System.Text.Encoding.UTF8.GetBytes(correlationID);
mqQueue.Put(mqMsg, mqPutMsgOpts);
I am using MQ PUT and GET options via MQ.NET classes.