Reputation: 11
I am getting below error while putting some data on Reply Queue. My Application flow is I have a MQ Listener(Spring Boot Container) in place which keeps on listening to a REQ Queue and process the data once received on REQ Queue and finally puts the processed data on the REPLY Queue.
In my case, the issue is coming while sending the data on REP Queue after certain number of request and reply flows and I am sure while it reaches the MAX HANDLE count this issue starts coming. For temporary fix, now I am restarting my MQ Listener container.
Can someone help on where can I check the MAXHANDS count(I assume its configured at MQ end) and is there any way to check after how many counts the issue is getting reproduced?
Note: I am consuming IBMMQ and all Queue Infrastructure is managed by the MQ Team.
Error Details:
Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2017' ('MQRC_HANDLE_NOT_AVAILABLE').
Immediate help much appreciated.
public class MessageHandlerImplRCC implements SessionAwareMessageListener {
@Override public void onMessage(Message message, Session session) {
TextMessage imbMqReplyMessage = session.createTextMessage();
imbMqReplyMessage.setJMSMessageID(message.getJMSMessageID());
imbMqReplyMessage.setJMSCorrelationID(message.getJMSMessageID());
imbMqReplyMessage.setText(dlmToDemiMappedString);
MessageProducer messageProducerIBM = session.createProducer(message.getJMSReplyTo());
messageProducerIBM.send(imbMqReplyMessage);
message.acknowledge();
}
}
Upvotes: 0
Views: 5118
Reputation: 7525
To see how many handles one task can have open, use the following MQSC command:-
DISPLAY QMGR MAXHANDS
By default this is 256. Rather than increasing this however, you should be closing off handles that you are no longer using.
Issue the following MQSC command to find your connection.
DISPLAY CONN(*) TYPE(CONN) APPLTAG
and look for your application name in the APPLTAG
field, then copy out the CONN
value and issue this MQSC command:
DISPLAY CONN(paste-in-conn-value) TYPE(ALL)
and you will see all the queues you have opened. If you don't think you need to keep them all open, then close off the ones you don't need, for example by using:-
messageProducerIBM.close();
Restarting the listener has the effect of closing them all off, which sets your number of handles back to zero.
Upvotes: 1