We have created VSM using IBM MQ Native which has two request queue and one response queue.
Could you please help me on how to read request data in both queues to process response data.
Generally we will use below for single request,
String input = lisa_vse_request.getBodyAsString();
VSE in general only processes one request at a time. You can build an MQ recorder and VSM with multiple request queues, but that just means it's listening for requests on multiple queues. Each request is still processed in its own transaction.
I can think of two options:
1. Build a stateful VSI. Your first request goes into a transaction with zero responses, and your second request is in a second transaction following the first one and contains the response. If you're not sure that the two requests will always arrive in the same order then you may need create a duplicate of two-transaction conversation and reverse the order of the requests.
2. Build a separate VSM that watches your two request queues, combines two requests into a single request, and forwards it to a third proxy requests queue on which the VSM is listening.
(1) would be ideal, but I've never tried something like that before.
Thanks Kevin for a suggestions.