Service Virtualization

  • 1.  Filtering Messages by client on MQ (Native)

    Posted May 23, 2018 12:57 AM

    I am working on one of the task where client will put request on REQ MQ and lisa will fetch the same process and send to a RSP Queue from where client will catch the response . I am bit confused how will client identify the response to a corrsponding request.

    I am aware it can be done through correlation-messageid but that would be genrated by lisa service itself after recieving request . i want something from client request itslef to filter from and pass onto response.

     

    How can i achieve this ?

    Kevin.Bowman 



  • 2.  Re: Filtering Messages by client on MQ (Native)
    Best Answer

    Posted May 23, 2018 01:27 PM

    What you are describing is a Virtual Service.  The standard way to build a Virtual Service is to generate it with the VSE Recorder or RR pairs.  The resulting MQ service model uses a Service Image to generate the response and can use the build-in correlation schemes as a service would, copying IDs from the request to the response.

     

    If you are building your own service model by hand, so it doesn't use a service image, then you will have to do the copying yourself.  Make sure the 'Quiet' flag is unchecked on your listen step.  The incoming message's Message ID will be saved to the testExec property 'lisa.ibmmq.Recv.MQMD.MessageId'.

     

    Go into the respond step, beside 'Header Properties', click 'Open Editor.  Click the '+' button, and select 'Basic' -> 'Correlation ID'

     

    Beside 'Correlation ID', click the gear icon and select 'DevTest Property Reference':

     

    Enter the property name: lisa.ibmmq.Recv.MQMD.MessageId



  • 3.  Re: Filtering Messages by client on MQ (Native)

    Posted May 24, 2018 12:27 AM

    Thanks kevin. But i am using version 8 as of now and i belive it does not support that much options. 

    I tried publishing messages on queue hardcoding Coorelation ID in message proeperties and fetching it from same queue using same correlation id as subscriber properteis to filter out and it was working fine . 

    But my question here is while developing the service if i am opting Coorerlation id to message id then Correlation id will be generated by Model itslef Dynamically that wll be copied to message id . Am i right here ?

    - If yes then how will consumer application idenitfy the generated Co id/Message id to filter on . 

     

    Other thing i am thinking of is do application/client need to pass any specific unique id in request payload itself which i can use further as correlation id to pass onto response. how will the actual scenario work ?



  • 4.  Re: Filtering Messages by client on MQ (Native)

    Posted May 24, 2018 04:53 AM

    Even in DevTest 8 you are still describing a Virtual Service.  You can generate a VS using the older IBM MQ Series transport protocol that does Message ID/Correlation ID copying automatically.  In that version it's called "Transaction Tracking" instead of Correlation Scheme.

     

    You can also build the equivalent of what I described above manually with the old IBM MQ Series test steps.  You will need to add an "Extract Payload and Properties" filter to the Listen step in order to extract the Message ID/Correlation ID to a testExec property.  Then you basically do the same thing on the respond step, editing the message properties and putting in a "{{....}}" property reference for correlation ID.



  • 5.  Re: Filtering Messages by client on MQ (Native)

    Posted May 25, 2018 01:33 AM

    Hi Kevin, 

     

    Everything is fine till here but need answer for below .

    how will consumer application idenitfy the generated Co id/Message id to filter on since id is genrated by our service internally .



  • 6.  Re: Filtering Messages by client on MQ (Native)

    Posted May 25, 2018 01:42 AM

    Your virtual service copies the ID from the request to the response.  It does generate the ID.



  • 7.  Re: Filtering Messages by client on MQ (Native)

    Posted May 29, 2018 03:15 PM

    Hello Rahul3183,

     

    Did Kevin's responses help you?

     

    If yes, please could you mark it as the correct answer?

     

    Thank you,

    Heloisa



  • 8.  Re: Filtering Messages by client on MQ (Native)

    Posted May 30, 2018 12:33 AM

    Hi maria, 

    That was helpful . Marked from my end 

     

    Kevin.Bowman How can i reach you for one to one chat . Do we have chat portal here . 



  • 9.  Re: Filtering Messages by client on MQ (Native)

    Posted May 30, 2018 11:36 AM

    So my previous response should have read: "Your virtual service copies the ID from the request to the response. It does *not* generate the ID."  Sorry if that caused any confusion?

     

    If you have further questions then you need to either ask them here or engage with support.



  • 10.  Re: Filtering Messages by client on MQ (Native)

    Posted Jun 01, 2018 02:50 PM

    Thanks kevin. That cleared my doubt .