Map5 introduces some new features, including the ability to get more than one message per burst and using the PUT function to call adapter functions. Map5 will attempt to map 105 messages from the .\queue1 queue to the .\queue2 queue. The MSMQQueue input card value for the GET > Source setting is MSMQ. The output card Sink1 value for the PUT > Target setting is Sink, which is an empty output.

The Map Designer runs the PUT function on exit only for each appearance of the MessageContainer object on the input side, which is a component of the ConcatenatedMessages group type in the Msmq_In.mtt type tree.

The Message group type is a component of the MessageContainer group type. The Message group type contains one message with the literal message initiator value of <MESSAGE><CR><LF> and the literal message terminator value of </MESSAGE><CR><LF>. These initiators and terminators are for messages with more than one property, as opposed to the <BODY><CR><LF> initiators and terminators for messages with only body (content).

The GET > Source > Command setting for the MSMQQueue input card is:

-QN .\queue1 -HDR -QTY 105 -LSN 3 -T

The Quantity adapter command (-QTY 105) specifies retrieval of 105 messages from the .\queue1 queue. The Listen adapter command (-LSN 3) specifies a wait period of not more than three seconds per burst. The Header adapter command (-HDR) specifies inclusion of all properties of the messages. The Trace adapter command (-T) specifies that function calls will be tracked in the msmqtrace.log file located in the map directory.

The map rule for the Sink1 output card specifies the PUT function.

This map rule specifies the usage of the MSMQ Adapter. For each occurrence of the MessageContainer data object, extract the message label and message body from the input message and call the adapter function with the following adapter command:

-QN .\queue2 -T -LABEL label_constructed_from_input

Where label_constructed_from_input is the message label value constructed from the type values in the input card.

In the input card, the value of the SourceRule > FetchAs > FetchUnit setting is 10, specifying retrieval of ten messages per burst.

Before running Map5, purge the .\queue1 queue.