You can use a configuration file to send records to multiple queues,
with the queue utility.
When delivering one set of data to many queues, you must tell
the queue manager how to set up its distribution. The idea is to create a
type of distribution in which the first queue gets one record, then the next
queue gets one, and so on.
The queue utility configuration file is
named qutil.ini and should be in the same directory as the queue utility executable
file.
Parameters
- [sectionname]
- Name of the section. You can specify multiple groups of configuration
settings within a single configuration file, and then refer to those settings
on the command line by specifying that section name. For example, you can
name sections CFG1 (configuration 1) or CFG2 (configuration 2) and refer to
those sections when issuing queue utility commands.
- MessageCountMax
- Maximum number of records allowed in each queue at any given time. When
a queue is full, the utility stops processing records.
- FullCountMax
- Specifies the total number of records that can be in all the queues, as
opposed to just one queue. When all the queues are full, the utility pauses
the flow of data and waits for records to move into pipelines for processing,
freeing up space in the queues. Works with FullPause.
- FullPause
- The number of milliseconds that the queue utility pauses the flow of data,
allowing data in the queues to be processed when FullCountMax is reached.
- Qoutn=qname
- The names of the output queues for this section. The names of the output
queues can be whatever makes sense, however the parameter must be Qoutn where
n is an integer starting with 0. The value of n must be sequential
from 0 to n where n is the last queue defined. This format is required.
Change only the number of the Qoutn identifier and the qnames.
Example
The following example shows that you have two
sets of instructions (one using 2 queues and one using 4 queues). A maximum
of 2,500 records in each queue at any time, the most records in all queues
is 10,000, and the queue utility pauses for 3 seconds before it tries to load
more records in any queue after FullCountMax has been reached. Then, it lists
the names of the 4 queues to use.
[CFG1]
MessageCountMax=2500
FullCountMax=10000
FullPause=3000
Qout0=qnameA
Qout1=qnameB
[CFG2]
MessageCountMax=2500
FullCountMax=10000
FullPause=3000
Qout0=qnameA
Qout1=qnameB
Qout2=qnameC
Qout3=qnameD