I have a very strange problem - sometimes (~8% of all messages) our microservice, which sends and receives messages from IBM MQ, doesn't receive a message from the queue, but this message exists in the queue, service just waits 50 sec (it's our time out) and that's all. Nothing about exceptions in the log...
The main question not about the reason for the problem, this one about why IBM MQ client(com.ibm.mq.allclient version 9.1.1.0) doesn't throw an exception?
Update For more details: We have client which try to get message from queue during 50 seconds. The code below is very simple:
private fun receiveMessage(messageId: String, properties: ApplicationProperties): String {
val routeId = route.id
val responseQueue = properties.client.responseQueue
val response = jmsTemplates[routeId]?.receiveSelectedAndConvert(responseQueue, "JMSCorrelationID='$messageId'")
return response?.let {
RequestContext.getCurrentContext().responseStatusCode = 200
it.toString()
} ?: throw ZuulRuntimeException(ZuulException("Forwarding error", 500, "No response message has been received for : "
+ "routeId=" + routeId
+ "; messageId=" + messageId
+ "; responseQueue=" + responseQueue))
}
Unfortunately I don't have direct access for queue but I can get some logs files and as I can see messages have appeared in reply queue for 8-9 seconds. It looks like everything is fine, but I don't know why ibm client couldn't pick up message from queue for 50 seconds. I increased timeout and see that these suspended jsm client requests pick up messages from reply queue for 57-61 seconds. And for me is unclear two things: 1) What the reason for delay 2) And why implementation of ibm jms client doesn't throw any exceptions only forward null like response.
About version of com.ibm.mq.allclient: I've used versions: 9.1.0, 9.1.1, 9.1.5
DISPLAY QSTATUS(qname) ALL
and see what value is shown for theUNCOM
attribute. – Morag Hughson