Posted: Tue Mar 25, 2008 10:30 am Post subject: How do I set routing params with in JMS for MQ?
Acolyte
Joined: 14 Feb 2006 Posts: 63
Hello!
(You all have probably seen my prev message).
I try to ask it in an better way.
I need to set params in a JMS-message that a MQ-broker should use for routing.
I thought that the following should do the trick:
BytesMessage message = session.createBytesMessage();
//The data
message.writeBytes("hubba".getBytes());
//The routing param
message.setStringProperty("testkey", "testvalue");
But when I consume the message like:
Message message = queueReceiver.receiveNoWait();
if(message instanceof BytesMessage)
{
System.out.println("param: " + message.getStringProperty("testkey") );
}
I just get: "null" ?????
I have also tried to view the message with rfhutil.exe
But I can not see any trace of the routing param?
So please if any one have any idea how to set the routing param properly please tell me!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum