Service Virtualization

Expand all | Collapse all

How to capture valid data from JMS?

Jump to Best Answer
  • 1.  How to capture valid data from JMS?

    Posted 10-20-2016 05:04 AM

    Scenario:

    We are Publishing a JMS message (which contains a unique id) on a Queue (in the beginning)
    The flow goes through multiple Adapters/Databases in between
    Then we are Subscribing to a Topic (which is in different domain)
    The problem is it is fetching data/XML corresponding to other unique ids (which are published by other systems/Queues)
    How best we can manage this scenario where we can fetch only the details of the unique ids sent by us?

     

    We are using CA LISA 7.5



  • 2.  Re: How to capture valid data from JMS?
    Best Answer

    Posted 10-20-2016 06:05 AM

    You want to use the JMS Payload correlation scheme. I believe this functionality was first released in LISA v7.5, and so I'm not sure whether all the creases were ironed out by then:

    JMS Payload

     

    If you're publishing the message using LISA, I presume you have a property containing the unique ID. Simply put that property in the "Manual Value" text box and put the xpath of the tag in which that property exists in the "Payload Scheme" section.



  • 3.  Re: How to capture valid data from JMS?

    Posted 10-21-2016 07:45 AM

    Thanks Rick.

     

    Please explain in detail. Not sure if we understood completely.



  • 4.  Re: How to capture valid data from JMS?

    Posted 10-21-2016 08:07 AM

    We are Publishing a JMS message (which contains a unique id) on a Queue (in the beginning)

    So it sounds like your unique ID is in the message payload.

    The flow goes through multiple Adapters/Databases in between

    There will probably be no JMS parameter stored, against which to correlate.

    Then we are Subscribing to a Topic (which is in different domain)

    Good, so you're getting a copy of every message. It's up to you what you do with that copy (discard it or respond to it).

    The problem is it is fetching data/XML corresponding to other unique ids (which are published by other systems/Queues)

    That's completely expected. You need a correlation scheme to determine what you discard and what you act upon. There are three correlation schemes. MessageID-to-CorrelationID, CorrelationID and JMS Payload. You say that your unique ID is in the payload, so you want the payload correlation scheme, which I linked to in my previous response.

    How best we can manage this scenario where we can fetch only the details of the unique ids sent by us?

    You manage the scenario by following the documentation in the link.

    We are using CA LISA 7.5

    That version of LISA has the JMS Payload correlation scheme built-in.

     



  • 5.  Re: How to capture valid data from JMS?

    Posted 10-21-2016 07:41 AM

    Kevin.Bowman..Please help.



  • 6.  Re: How to capture valid data from JMS?

    Posted 10-21-2016 11:32 AM

    Rick's answers cover it pretty well.  Note that you need to be using the new 'JMS Send Receive' step in order to use payload-based correlation.  It's not supported with the old 'JMS Messaging (JNDI)' step.