Service Virtualization

  • 1.  How to send newly created JMS header property along with request?

    Posted Oct 04, 2018 06:31 AM

    Hi Team,

     

    I have a router VS. The job of this VS is to listen the request from the Queue: PROXY1 and re-drop the same request in another Queue: PROXY2 but this time with property name as "paymentType" which should be JMS header property -> So that multiple VS listening on PROXY2 can pick only those request which matches there paymentType.

     

    Please refer Rick.Brown comments on below thread. I want to implement this in same way.

     

    Multiple VS listening on same Queue 

     

    I tried to enter manually in VSI Response - Meta-data paymentType = BACS. But MQ Team did not find any header property in re-dropped request with key name "paymentType".

     

    Any help will be greatly appreciated.

     

    VSI Screenshot - If Prtry = BACS - Re-drop the live request again but with new JMS header

     

     

    JMS Header manually added:

     

     

    Rick.Brown Kevin_Bowen sdabbiru abrsh01 DevTest Community



  • 2.  Re: How to send newly created JMS header property along with request?
    Best Answer

    Posted Oct 04, 2018 03:43 PM

    Pranay,

     

    Instead of paymentType, please add something like msg.props.pt

     

    Thanks,

    Heloisa



  • 3.  Re: How to send newly created JMS header property along with request?

    Broadcom Employee
    Posted Oct 08, 2018 06:29 AM

    The proxy virtual service looks like this:

    You can see that there's an extra "JMS Send Receive" step which doesn't exist in an auto-generated model.

     

    That step looks like this:

     

    Note that it's a custom property, not a JMS header.

     

    So it's referencing the properties "request_paymentMethod" and "request_payload" that don't normally exist. Those properties are generated by a scriptable DPH in the listen step, and look like this:

     

    Ok, so that's the changes to the proxy service completed. What about the services with message selectors?

     

    There are a number of models that listen to the same topic, each with "JMS Consumer" set in the listen step:

     

    When I send a payment method of "NEFT", that virtual service responds, and my client receives a response within a couple of seconds.

    When I select a payment method of "RICK", my virtual service with a JMS Consumer matching "paymentMethod = 'RICK' " responds, and my client receives a response within a couple of seconds.

    When I select a payment method that doesn't match a virtual service, my client times out.

     

    I believe this is the expected behaviour. Please let me know if it isn't.

     

    Rick



  • 4.  Re: How to send newly created JMS header property along with request?

    Posted Nov 13, 2018 10:31 AM

    Hi Rick

     

    I have a almost similar requirement where I am trying to create routing VS which would read the value from transactionName property in scriptable protocol and based on the value should route it to corresponding Virtual service.


    I tried to implement above solution but my routing service isn't able to hit actual VS.

    In my routing VS I only created 3 steps (Listen , JMS Send/Recieve , Respond). 



  • 5.  Re: How to send newly created JMS header property along with request?

    Posted Nov 13, 2018 10:39 AM

    What uniqueness you have in your request? Is uniqueness is in request Payload or in its header properties.

    Ideal way of doing routing is:

     

    1) Route your request with header property. This header property will be manually added in router vsi. This way the actual VS will be able to pick the request. If possible could you please let me know the actual request you are passing.

     

    There is official document on this problem- when I encountered this issue. Please refer to his page:

     

    How to set multiple Virtual Services to listen on - CA Knowledge