Websphere MQ - error with reason code 2042 on get

We are getting an intermittent error when called ImqQueue::get( ImqMsg &, ImqGetMessageOptions & );

with reason code 2042, which should not have Happen ™; Based on Websphere documentation we only need to get the reason code at the opening.

Will this error indicate that the server cannot open the queue on its side, or does it indicate that our client has a problem? What is the best way to deal with this error? Now we just register that this happens, but it happens a lot. Unfortunately, I am not familiar with Websphere MQ; I kind of collect this as I go, so I don't have the correct terminology.

Our client is written in C ++ bundled with libmq 6.0.2.4 and running on SLES-10. I don't know the details for the server other than 7.1. We are requesting an update to update our side. We have multiple client instances running concurrently; all use the same request queue, but each creates its own dynamic response queue with MQOO_INPUT_EXCLUSIVE + MQOO_INPUT_FAIL_IF_QUIESCING

.

+3


source to share


1 answer


If the queue is not already open, the ImqQueue :: get method will implicitly open the queue for you. This will enable the MQOO_INPUT_AS_Q_DEF option, which will use the DEFSOPT (EXCL | SHARED) attribute on the queue. You should also double check that the queue is defined by SHARE and not NOSHARE, but I suspect it will already be set correctly.

You mentioned that you have multiple instances of the application running concurrently, so if one of them has a queue open implicitly like MQOO_INPUT_AS_Q_DEF, which results in MQOO_INPUT_SHARED from DEFSOPT, then it will get 2042 (MQRC_OBJECT_IN_USE) if others open it. If nothing was open at the time, then the implicit open would work, and later instances would get 2042 instead.



If it is intermittent, then I suggest that you have a path in your application where the ImqQueue :: open method is not called. While you're looking for this, changing the queue definition to DEFSOPT (SHARED) should get rid of 2042.

+1


source







All Articles