Service Virtualization

 View Only
  • 1.  How can I access the usr User Properties in MQRFH2 Folder from MQ VS

    Posted Jan 19, 2017 01:45 AM

    I have to implement live routing based on one of the usr User Property which is passed in MQRFH2 header information.

    Please let me know if there is any way in devtest 9.1 to capture these details.



  • 2.  Re: How can I access the usr User Properties in MQRFH2 Folder from MQ VS

    Posted Jan 19, 2017 03:22 AM

    If you are using the IBM MQ Native protocol then it should detect the RFH2 header automatically, and you should see all the RFH2 headers and properties in the request meta-data:

     

    Here, for example, the recorded RFH2 header contained two "folders", the first of which is the 'usr' folder.  The 'usr' folder contained two properties, 'key1', which contains a string value of "value1", and 'key2' which contains an integer value of 5. 

     

    More specifically:

    • Payload.class: specifies the type of the payload inside the MQ message, in this case, 'RFH'
    • Payload.Folders.1.template: specifies the type of the first folder in the RFH2 header, in this case, 'usr'.
    • Payload.Folders.1.Props.key1: specifies a value for the 'key1' property
    • Payload.Folders.1.Props.key2: specifies a value for the 'key2' property
    • etc.


  • 3.  Re: How can I access the usr User Properties in MQRFH2 Folder from MQ VS

    Posted Jan 19, 2017 06:18 PM

    Awesome, thanks Kevin, 

     

    I am able to get the values which i was after from the request. Also to mention, i had to set the Property Option as Force MQRFH2 within the Get Options of the Listen Step.

     

    I need to pass the same details in the response side as, will try it out.



  • 4.  Re: How can I access the usr User Properties in MQRFH2 Folder from MQ VS
    Best Answer

    Posted Jan 19, 2017 07:03 PM

    Yeah, with newer version of MQ you do need the 'Force MQRFH2' option enabled under 'Get Options' to actually receive the RFH2 header.  Otherwise the MQ server strips it out even if there are usr properties in there.

     

    The same property scheme should work on the response side, but you do need to be careful that you're setting everything.  Make sure 'Payload.class' is set to 'RFH', and the rest should work fine.



  • 5.  Re: How can I access the usr User Properties in MQRFH2 Folder from MQ VS

    Posted Jan 25, 2017 02:45 AM

    Hi Kevin

    is there a way this value "lisa.ibmmq.Send.Payload.RFH.Format" can be ignored when MQ requesr is sent from LISA which uses RFH2 headers.

     

    I noticed that when we set the RFH2 header the above property gets set as default to MQSTR, and my system complains that the attribute format was MQSTR but was expecting   '        ' or 'MQHRF2  '.

     

    I tried to send the same message using rfhutil and i dont specify the Data Format (leave it blank) in the rfh header section and it works, but i cannot do the same in LISA.



  • 6.  Re: How can I access the usr User Properties in MQRFH2 Folder from MQ VS

    Posted Jan 19, 2017 03:25 PM

    Syed,

    Did Kevin's response answer your question?