I think it goes like this:-
queue = queueManager.AccessQueue(parms.PutReplyToQ, MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING, parms.PutReplyToQMgr,"","");
So, it is not the queue that you read the message from but the queue you want to put the reply to.
The MQQueue class documentation says of the dynamicQueueName parameter (#4) that it is ignored unless the first queue name parameter (#1) is a MODEL queue, which yours is not.
I am happy to hear that you are learning about a new thing. Request/Reply is a very common model. It allows the application reading the requests and building the replies to be able to handle any reply destination. The reply destination doesn't have to be part of the parms to the application, but instead pulled out of the request message. Using both the ReplyToQ and ReplyToQMgr fields is also best practice and allows applications making the request and processing the request to connect to different queue managers.
See whether the code above gets it working.
Feel free to ask more questions here if you want to know more about Request/Reply pattern.
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Website:
https://www.mqgem.com------------------------------