Viewing and replaying messages
- Before looking at the web interface, you need to put a message on the INQ queue so that you can see that it has been recorded into the database. The simplest way to do this is to use MQ Explorer and select INQ from the list of queues. Right-click the queue and click Put test message. At the prompt, enter some content data for a message:
- You have now recorded your first message to the database. If it is not already open, start up the Web Administration Interface by going to http://localhost:4414:
- In the left-hand navigator, open the Data section and select DefaultCaptureStore. If it is not visible, check that the egForView property is defined as a valid execution group
in the configurable service. You should see that a message has been recorded:
If you do not see a message, verify that the mqsichangeflowmonitoring command has been run, that the DataCaptureSource and DataCaptureStore definitions are correct, and that the database is defined and available in ODBC.
- You can customize your data viewer by choosing columns, changing the column names and order by clicking Customize to customize the view on a per-DataCaptureStore basis, regardless of user.
- You are now ready to replay a message to a destination, which was defined using the INQ DataDestination configurable service above. When a message is replayed, it will be sent to the defined endpoint (the queue called INQ). Since this queue is the input for the flow, the replayed message will be re-recorded and become visible in the Data Viewer. To replay the message, select the check box to the left of the messages you want to replay and then click Mark for replay, which takes you to the second tab, where you can see your chosen messages and select the destination to play them to.
- Click the green arrow next to a message to replay one, or select Replay all at the top of the screen:
- Having successfully replayed a message, change from the Replay list tab to the Data viewer tab and click Refresh on the viewer. You will now see another message, which is the replayed message having been re-recorded by the flow.
- Replay the message again, but this time, make the target flow (TestFlow) fail the message and create a message on the catch terminal by put-inhibiting the flow's output queue.
You can either use MQ Explorer as described above, or run the following command inside runmqsc:
ALTER QLOCAL(OUTQ) PUT(DISABLED)
- You now have four messages in the Data Viewer. Message 1 is the original recorded message, which you replayed to create Message 2. This message was injected into the original flow, emitted from the out terminal, and recorded as Message 3. But it then failed to be put to OUTQ and therefore went to the catch terminal as Message 4. Now that you have multiple messages in the Data Viewer, you can experiment with message filtering, and look at the captured message payload and exception information. When you have finished, remember to put-enable the OUTQ.