|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQMD fields JMS_IBM_MQMD_REPLYTOQ and JMS_IBM_MQMD_REPLYTOQM |
« View previous topic :: View next topic » |
Author |
Message
|
DaeMoohn |
Posted: Thu Jun 17, 2010 10:18 pm Post subject: MQMD fields JMS_IBM_MQMD_REPLYTOQ and JMS_IBM_MQMD_REPLYTOQM |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
Good morning,
Our server side partners want us to modify the MQMD fields JMS_IBM_MQMD_REPLYTOQMGR and JMS_IBM_MQMD_REPLYTOQ on the messages we are placing on the queues. The problem is that we cannot set them. Although ia9h pdf states "By default
access to MQMD is disabled and must be enabled explicitly by the application
using Destination properties XMSC_WMQ_MQMD_WRITE_ENABLED and
XMSC_WMQ_MQMD_READ_ENABLED", and we set on the queue the XMSC_WMQ_MQMD_WRITE_ENABLE boolean property to true, every time I try to set those MQMD fields, I am getting thrown an error stating those fields are readonly. I cannot use the XMS field ReplyTo because the JMS_IBM_MQMD_REPLYTOQMGR value doesn't reference a valid queue manager (it's some hint for the server side, or something). Can you please provide me with an example, a hint, anything?
Thanks a lot. |
|
Back to top |
|
 |
calanais |
Posted: Fri Jun 18, 2010 1:05 am Post subject: |
|
|
Apprentice
Joined: 12 Mar 2010 Posts: 32
|
Sounds like you could setting those fields after the message has been sent or the message as been set as readonly..
Double check when you are setting the fields.
Check the WMQ JMS Samples as well - there are some examples there of using this functionality. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jun 18, 2010 1:18 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You shouldn''t need to set these fields directly. You should be able to set them as properties of the Destination object, without treating them as MQMD properties. |
|
Back to top |
|
 |
DaeMoohn |
Posted: Fri Jun 18, 2010 1:40 am Post subject: |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
Here is a part of the code:
XMSFactoryFactory factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
IConnectionFactory connectionFactory = factoryFactory.CreateConnectionFactory();
connectionFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, "remotemq");
connectionFactory.SetStringProperty(XMSC.WMQ_CHANNEL, "saasa");
connectionFactory.SetIntProperty(XMSC.WMQ_PORT, 1414);
connectionFactory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "sasa");
connection = connectionFactory.CreateConnection();
connection.ExceptionListener = new ExceptionListener(OnException);
ISession session = connection.CreateSession(false, AcknowledgeMode.AutoAcknowledge);
IDestination queue = session.CreateQueue("queue://qm/queue");
***here i would set the property of XMSC_WMQ_MQMD_WRITE_ENABLED ***
***then i would try to set the two properties***
IMessageProducer producer = session.CreateProducer(queue);
connection.Start();
That is the code.
To respond to mqjeff: You are reffering to "ReplyTo" property of te IDestination. I cannot use that because the other side wants to have "<none>" specified on the reply to queue manager. There is no need to tell you that is not the name of the queue manager I am working with. To give you a broader view:
We are using a remote queue manager. The queues where I write are remoted from a foreign server. The queue from where I read are local, and the foreign server writes on them. So if I set the ReplyTo property, they will see there a server they cannot touch (local server, not foreign server). I don't know how to set the queue manager to that particular string. Also, I don't think I can create a mock queue manager object to which to connect with the correct queue name. Using IBM MQ Classes for .NET, I was able to use
mqmessage.ReplyToQueueManagerName = "<none>";
mqmessage.ReplyToQueueName = InputQueue;
I am searching for an equivalent in XMS.
I do understand your argument that what I am wasking for isn't supposed
to happen, but that's the current situation/requirement. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jun 18, 2010 1:38 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You are going about it the wrong way.
you need to do something like:
Code: |
Queue myreplytoDestination = mysession.createQueue("queue://QMGR/QUEUE");
requestmsg.setReplyToDestination=myreplytoDestination; |
Note that if you leave the qmgr blank (queue:///queuename) the queue manager you are connected to gets automatically filled in.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
DaeMoohn |
Posted: Sun Jun 20, 2010 9:58 am Post subject: |
|
|
Apprentice
Joined: 04 Jun 2010 Posts: 26
|
Thanks, I'll try that monday.
Never crossed my mind! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|