Team,
We are not able to read messages using Java code which is added from rhfutil app.
In our Queue, we have 5 messages 4 are inserted from rfhutil and one from the java write operation
when we run read code, it reads only the message inserted using the java write operation, it's not reading messages inserted using rfhutil
output of java code


Java Code
MQQueueManager manager;
MQQueue queue = null;
boolean getMore = true;
Hashtable<String, Object> mqht = new Hashtable<>();
mqht.put(CMQC.CHANNEL_PROPERTY,channel);
mqht.put(CMQC.HOST_NAME_PROPERTY, host);
mqht.put(CMQC.PORT_PROPERTY, new Integer(port));
mqht.put(CMQC.USER_ID_PROPERTY, username);
mqht.put(CMQC.PASSWORD_PROPERTY, password);
manager=new MQQueueManager(queueManager, mqht);
int openOptions = MQConstants.MQOO_BROWSE | MQConstants.MQOO_INPUT_EXCLUSIVE | MQConstants.MQOO_INQUIRE;
queue = manager.accessQueue("DEV.QUEUE.1",openOptions);
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQConstants.MQGMO_WAIT + MQConstants.MQGMO_FAIL_IF_QUIESCING
+ MQConstants.MQGMO_CONVERT + MQConstants.MQGMO_BROWSE_NEXT ;
try {
while(getMore)
{
MQMessage message = new MQMessage();
queue.get(message, gmo);
byte[] b = new byte[message.getMessageLength()];
message.readFully(b);
System.out.println(new String(b));
}
} catch (MQException e) {
if (e.reasonCode == 2033)
{
System.out.println("No message available");
}
if ( (e.completionCode == CMQC.MQCC_FAILED) &&(e.reasonCode == CMQC.MQRC_NO_MSG_AVAILABLE) ) {
}
else
{
System.out.println("MQException: " + e.getLocalizedMessage());
System.out.println("CC=" + e.completionCode + " : RC=" + e.reasonCode);
getMore = false;
}
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
manager.disconnect();
queue.close();
}
can you please help us to understand why we are not able to read rfhutil data ?
------------------------------
Ranjitha YM
------------------------------