Posted: Mon Mar 16, 2015 5:30 am Post subject: Putting messages to cluster queue
Acolyte
Joined: 17 Jul 2014 Posts: 54
I have written a java application using /opt/mqm/samp/wmqjava/samples/MQSample.java as a template. Everything works fine until I try to put a message to a cluster queue, when doing so I get an MQRC 2085. Even using the unedited (except for changing the queuemanager name) original MQSample.java results in the same thing. I know the cluster and the queue is configured property because if I use the C Sample amqsput, it works fine.
Here is the code as it relates:
Code:
private static final String qManagerName = System.getenv("QMGR");
qmgr = new MQQueueManager(qManagerName);
int statoo = MQConstants.MQOO_FAIL_IF_QUIESCING | MQConstants.MQOO_OUTPUT;
MQQueue statQ = qmgr.accessQueue("REPLY.Q", statoo);
Look at the accessQueue methods on the infocenter. There are 2 methods (overloaded) and you are using the wrong one. Make sure you pass a blank queue manager name (not null) for the cluster queue.
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