Quantity (-QTY)

Use the Quantity adapter command (-QTY) to provide the number of messages to return in source contexts.

This is an optional command. The default is 1.

Note: The -LSN S and -QTY S commands cannot be used together. The default for -LSN is infinity. Therefore, if you specify -QTY S, you need to specify a specific value for -LSN.

-QTY num_of_messages
Option
Description
num_of_messages
Specify the number of messages to return in integer form.

For example, to specify 50 as the number of messages to return in source contexts:


-QTY 50

Note that when the JMS Adapter is used in the Map Designer to retrieve messages from the queue, every map that executes will leave the message cursor behind the last retrieved message.

For example, if -QTY 3 is used in input card, and there are 5 message on the queue, the first execution of the map will receive three messages from the queue. If the same map is run again in the same Map Designer session, it will not complete since there will be only two messages left behind the cursor. Only when an additional message arrives to the queue will the map complete because the -QTY 3 condition is then satisfied.

The second map would also complete if an LSN value was specified, in which case only two messages would be returned. For example, if -LSN 10 was specified, the second map would try to receive the third message for 10 seconds in order to satisfy the -QTY 3 condition, however, after 10 seconds it would complete and return only two messages because the -LSN 10 condition was met first.