Service Virtualization

  • 1.  How to use ReplyToQueue option in IBM MQ Native Send Receive Step

    Posted Mar 30, 2017 09:08 PM

    Hi,

    I have a requirement where in I need to "ReplyToQueue manager", so I have created a test case which contains 4 IBM MQ Native Send Receive Steps as mentioned below.
    Step 1: Consumes the request from System A
    Step 2: Sends the request to System B, after modifying the request
    Step 3: 3rd IBM MQ Native send receive step consumes response from System B
    Step 4: 4th IBM MQ Native send receive step should forward the response to System A using "ReplyToQueue" option

    Kindly suggest me how to do this.

    Thanks,
    Narasimha.



  • 2.  Re: How to use ReplyToQueue option in IBM MQ Native Send Receive Step
    Best Answer

    Posted Mar 31, 2017 04:10 AM

    Hi Narasimha,

     

    1. Add some filters to Step 1 to copy two property values into different properties (names on the right are just examples):

     

    lisa.ibmmq.Recv.MQMD.ReplyToQueueManager -> REPLYTO_QM

    lisa.ibmmq.Recv.MQMD.ReplyToQueueName -> REPLYTO_Q

     

    2. Create a Queue Manager asset where the value of 'Queue Manager' is '{{REPLYTO_QM}}', and then use that to create a Queue asset where the 'Queue Name' is '{{REPLYTO_Q}}'.

     

    3. Select that queue asset as the 'Send Queue' in Step 4.

     

    Please note that VSMs built by the VSE recorder take care of all of this automatically. 

     

    Regards,

    Jan



  • 3.  Re: How to use ReplyToQueue option in IBM MQ Native Send Receive Step

    Posted Apr 04, 2017 12:30 AM

    Hi Jan,

     

    I am getting following error.

     

    Error: Error opening queue manager <<QueueManagerName>>, Completion Code 2 (MQCC_FAILED), Reason Code 2058 (MQRC_Q_MGR_NAME_ERROR)

     

    There are 2 queue managers. One is for Service Virtualization team where virtual services Local and remote queues reside, on the other hand I will have to reply to a queue which is on another queue manager.

     

    Thanks,

    Narasimha



  • 4.  Re: How to use ReplyToQueue option in IBM MQ Native Send Receive Step

    Posted Apr 04, 2017 03:48 AM

    Hi Narasimha,

     

    I assume you are using MQ v8.0 or higher.

    You can check the IBM documentation on that error in the IBM Knowledge Center. Most likely the Queue Manager name is invalid or unknown.

     

    Jan



  • 5.  Re: How to use ReplyToQueue option in IBM MQ Native Send Receive Step

    Posted Apr 05, 2017 08:40 AM

    Hi Jan,

    Yes I am using MQ v8.0

    I have just parameterised  ReplyToQueueManager and ReplyToQueueName and tried by hard coding these 2 values as well but still getting the same error.

     

    As I mentioned, there are 2 Queue Managers available.

    QM1: DevTest Queue Manager

    QM2: Destination Queue Manger to which stub has to respond using ReplyToQueueManager option

     

    While responding in Asset I chose details as follows

    1) Selected/Entered QM2 details like QueuManager and all remaining details like Host name, Port number And client name are mentioned QM1 details because in DevTest QueueManager Reply to Queue Manager option is already enabled; however it was showing "Invalid QueuManger details"

    2) Selected/Entered QM1 details like QueuManager, Host name, Port number And Client name because in DevTest QueueManager Reply to Queue Manager option is already enabled; however it was showing "Unknown Object error".

     

    Could you please suggest me which queue manager details that I need to enter while sending response to QM2.

     

    Thanks a lot for your support.

     



  • 6.  Re: How to use ReplyToQueue option in IBM MQ Native Send Receive Step

    Posted Apr 06, 2017 10:20 AM

    Hi,

     

    OK, you will need to do the following:

    You need to create a new Queue Asset.  However, instead of creating a new Queue Manager Asset as well, there is a field on the Queue Asset called 'Override Queue Manager'.  Put {{REPLYTO_QM}} in there, and use the original Queue Manager Asset for 'Queue Manager'.

     

    Jan