How use whith IBM MQ the MQQueueManager.backout() metod whith spring framework?
I made it with code with ibm code.
I necessary make the backout on IBM MQ queue when there are exception in code.Code:MQGetMessageOptions gmo = new MQGetMessageOptions(); // Set // get // message // options gmo.options = MQC.MQGMO_WAIT + MQC.MQGMO_FAIL_IF_QUIESCING + MQC.MQGMO_CONVERT + MQC.MQGMO_SYNCPOINT; gmo.waitInterval = MQC.MQWI_UNLIMITED; while (true) { MQMessage myMessage = new MQMessage(); myMessage.clearMessage(); myMessage.correlationId = MQC.MQCI_NONE; myMessage.messageId = MQC.MQMI_NONE; System.out.println("waiting for message ... "); myQueue.get(myMessage, gmo); System.out.println("Get message sucessfull... "); System.out.println("Message lenght = "+myMessage.getMessageLength()); /** ********************************* */ /* Have we gotten to the threshold? */ /** ********************************* */ if (myMessage.backoutCount <= boThresh) { System.out.println("BackoutCount: " + myMessage.backoutCount + " of " + boThresh); qMgr.backout(); /* increase backout count by one */ }
Someone know how do it?


Reply With Quote