On 04/10/2013 11:17 AM, Rohit Magazine wrote:
My code sends a message to a queue and get a COA back. I am using C#.Net and
NMS.
Apache.NMS version 1.5.1.2739
Apache.NMS.ActiveMQ version 1.5.6.2746
I am setting the following properties of the message
Apache.NMS.IMessage request;
...
request = session.CreateBytesMessage(someStringToSend);
...
request.NMSCorrelationID = "Test_Message";
...
request.NMSReplyTo = mqDestination;
request.NMSDeliveryMode = MsgDeliveryMode.Persistent;
...
request.Properties["JMS_IBM_MsgType"] = 1;
request.Properties["JMS_IBM_Report_COA"] = 256;
....
producer.Send(amqDestination, request);
The message is sent successfully but the COA returned has a different
correlationID than this one. I wanted the COA to have the same correlationID
as that of this one.
When i tried to compare the headers sent and received, i see the messageID
been sent is the one that i am getting as a correlationID of the COA, but
when i am trying to set the messageID in my request using
request.NMSMessageId = "Test_Message";
It does not get set.
I added the following properties too, but it still is getting someother
correlation ID.
request.Properties["JMS_IBM_Report_Pass_Correl_ID"] = 64;
Am i missing anything here or is there some other way of setting the
messageID ??
Any help is appreciated
--
View this message in context:
http://activemq.2283324.n4.nabble.com/NMSMessageID-not-getting-set-while-sending-message-tp4665820.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
NMSMessageID is set by the MessageProducer and cannot be set via client
code as it must be uniquely identifiable per producer.
--
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.b...@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/