Hi,
We have an issue with our MQ Virtual service where we are seeing the messages are either not reaching our Lisa MQ queues or they are arriving and disappearing before we get a chance to extract them. Currently we are not sure whether the problem lies with MQ itself, our source system or Lisa.
We have been requested to extract the MQ Message ID for each message that appears on the Lisa Queue, so that we can identify the request/response pairs a little easier. However, so far we have only been able to extract a Lisa version of the messageID from this variable {{lisa.vse.messageid}}, in the VSM.
Is there a way to extract the actual Message ID that appears on the Queue?
I have also tried using the "Extract Payload and Properties from Message" filter, but when I try to write to a csv file, it doesn't recognise the declared variable and just prints the variable name. If this is the solution, does anyone know how you correctly set this up and on what step of the MQ VSM does this need to be setup
thanks.
{{lisa.vse.messageid}} stores the actual ID of the message that was received by LISA on the request queue. Unfortunately, it's stored in the testExec as a byte[] array because IBM MQ message IDs are binary. If you want to convert that to something else then you will need a script step. Here's one you can use to convert it to a hex string:
com.itko.util.BinaryUtil.toHex(testExec.getStateObject("lisa.vse.messageid"));
You can also just not run the virtual service, and instead use a test step to inspect any messages that arrive on the LISA request queue. If you're on LISA 8.1 or later then the new IBM MQ Native step will automatically encode message IDs to hex. With the old MQ step you will need to add an 'Extract Payload and Properties from Messages' filter to the step, specify a prefix, and use the above script step to turn {{<prefix>.message.id.bytes}} into hex.