C++ - MQ RC Code 2219

2019-07-21 17:02发布

问题:

I got a rc code 2219, the design of the program is we have 2 threads. One for getting messages and one for putting/sending messages to the queue. So we got 2 processes running simultaneously.

Here's the flow of get thread:

*connect to queue manager

*set connection reference/listener

*set get message option (wait indefinitely)

*open queue

*get message from queue

Here's the flow of put thread:

*connect to queue manager

*set connection reference/listener

*set put message option

*open queue

*put message to queue

  • get - will connect to queue manager, opens the queue and has a loop of getting messages indefinitely. (wait interval is set to unlimited, mqgmo_wait).

  • put - will connect to the same queue manager, opens the queue and will put messages to other queue. We got an error on put while opening the queue with rc code 2219.

Do you guys have any suggestion on how to address the rc code?