akiraYoshi
Programmer
I'm using MQSeries natively on a queue that contains message groups flagged with a correlationid that indicates the receiver of the message.
When performing a getWithOptions, I end up with an Exception "MQJE001: Beendigungscode 2, Ursache 2033", when the queue has no matching messages.
Checking on getCurrentDepth() has no effect, as the queue almost always contains messages with different correlationids. But with an empty queue this works...
Event try'ing the get results in the same Exception message in the eway's stderr logfile. I'd like to test whether the queue has matching entries before performing a get, so I can be sure it will work without Exception.
I would appreciate any idea, the mqseries documentation itself didn't provide any useful hint...
Thanks in advance, Aki
The Queue "initialization" looks as follows:
This is the actual get:
When performing a getWithOptions, I end up with an Exception "MQJE001: Beendigungscode 2, Ursache 2033", when the queue has no matching messages.
Checking on getCurrentDepth() has no effect, as the queue almost always contains messages with different correlationids. But with an empty queue this works...
Event try'ing the get results in the same Exception message in the eway's stderr logfile. I'd like to test whether the queue has matching entries before performing a get, so I can be sure it will work without Exception.
I would appreciate any idea, the mqseries documentation itself didn't provide any useful hint...
Thanks in advance, Aki
The Queue "initialization" looks as follows:
Code:
getinQueue().getqueueAccessOptions().optionsClearAll();
getinQueue().getqueueAccessOptions().setMQOO_INQUIRE(true);
getinQueue().getqueueAccessOptions().setMQOO_INPUT_SHARED(true);
getinQueue().accessQueue(inQueuename);
getinQueue().getQueue().getGMO().setMQGMO_SYNCPOINT(true);
getinQueue().getQueue().getGMO().setMQGMO_LOGICAL_ORDER(true);
getinQueue().getQueue().getGMO().setMQMO_MATCH_CORREL_ID(true);
This is the actual get:
Code:
getinQueue().getQueue().newMessage();
getinQueue().getQueue().getMessage().getMsgHeader().setCorrelationId(correlationbytes);
getinQueue().getQueue().getWithOptions();
getinQueue().getQueue().getMessage().getMsgBody().readData();
payload=getinQueue().getQueue().getMessage().getMsgBody().getData();