Search code examples
c++ibm-mqmq

IBM MQ mqrc 2042


Have an issue with one of MQ queue, where multiple C++ program is trying to access the queue from different host and they receiving 2042 error. I can see they are opening the queue as exclusive INPUT "INPUT(EXCL)" and APPLTAG(mqmessage). From queue manager side queue is set to shareable and DEFSOPT(SHARED) all looks good.

What are the changes required from C++ program not to open as EXCL input? So that multiple user can access?

Thanks


Solution

  • Openoptions of the C++ application have to be modified.If your c++ application is having "MQOO_INPUT_EXCLUSIVE" as one of the OpenOptions then it has to be removed. Check this MQOPEN options for removing messages

    Following stackoverflow answer is also on the similar lines IBM WebSphere MQ 2042 error