In one of our requirements, we want to Subscribe & Publish Topics simultaneously. Please let us know the ways of doing it in CA LISA 7.5.
We did the Parallel execution from Run Mode but it doesn't work.
So you want to start two listeners, one on each topic, without waiting for a message from each listener? Then you want to send a message to a queue, and then afterwards receive messages from those topics?
You can do this in a single test case with the old 'JMS Messaging (JNDI)' step, but with the newer 'JMS Send Receive' step this kind of thing isn't supported until DevTest 8.0.
You will need five steps in your test case: Three 'JMS Message (JNDI)' steps followed by two 'Async Consumer' steps:
The first two steps start the listeners on each of your topics. They should have only the 'Subscriber Info' section enabled, 'Type' should be 'Topic - ASYNC', and 'Async Key' should be some string unique for this topic in this test case. I simply used "TOPIC1" and "TOPIC2".
The third step sends your request. It should have only the 'Publisher Info' section enabled.
The fourth and fifth steps receive a message on each of the topic listeners you started in steps 1 and 2. For 'Async Queue' enter the 'Async Key' from the corresponding listener step (in my case, "TOPIC1" or "TOPIC2").
It's possible to do a similar setup with the newer 'JMS Send Receive' step, but not until DevTest 8.0 when the 'Prepare Only' checkbox was added on the Receive side.
I don't understand what you mean. Can you describe your scenario in more detail?
Thanks for the reply. Here the scenario is.
We are publishing an XML message from a Queue. A Topic is supposed to pick it up & so on.
It is only possible if we first Subscribe the Topic & then Publish it from the Queue, simultaneously (considering Topic being a Virtual space & all). How this scenario can be handled in CA LISA 7.5 version?
If we first Subscribe the Topic, execute the test case & then Publish the Queue, it doesn't work. But it works from multiple VMs. Like we are Subscribing the Topic from one machine, execute the test case & before it gets finished, we Publish the Queue from another machine. It's able to pick the XML message.
So we tried the Parallel execution from RunMode but it too didn't work.
In short, We need to Publish on a Queue & simultaneously Subscribe to 2 different Topics. How this scenario can be handled?
Thanks much for helping. I replicated the same & it totally worked. Appreciate your help.
As an alternative, we created Hold Queues for the Topics & that method worked too.
With the approach you suggested, it worked.
However now we found out that we are receiving extra copy of the messages.
If I am sending 3 requests then for the 3rd request we are receiving the 2nd request's response again.
We only receive the 3rd request's response if we provide a 4th request & so on.
It's hard to guess what's going on here. Are you running your test case in a loop, or do you restart the test case for each request? Do you need to be using a correlation scheme, possibly involving the Correlation ID JMS header? Are you using durable topic subscriptions?
Retrieving data ...