The Q Capture program reads database recovery log sequentially for changes to source tables. If the Q Capture program reads a change to one of your source tables, it adds the change to the corresponding database transaction that is retained in memory.
Transactions in memory are therefore potentially subsets of the corresponding transactions in the log because they contain only changes to the source tables in your Q subscriptions. When the Q Capture program reads the COMMIT statement for a transaction, it converts the transaction into a message and puts the messages on a send queue.
For example, you create two Q subscriptions for two different source tables on the same source server: QSUB1 and QSUB2. Both Q subscriptions use the same replication queue map. The Q Capture program reads a COMMIT for a database transaction that involves changes to the source tables in both Q subscriptions. The Q Capture program converts the changes into a message and writes the message to the send queue that is part of the replication queue map.
You can run more than one Q Capture program. Although one Q Capture program can capture changes made to many sources and send those changes to many target servers, in some situations you might benefit from having more than one Q Capture program. For example, you can use multiple Q Capture programs to parallelize traffic. Multiple Q Capture programs, which could also be helpful in large sysplexes, can improve performance and achieve higher throughput. The trade-off is additional CPU overhead associated with multiple log readers. Using multiple Q Capture programs also requires more database connections.
The following figure shows the Q Capture program capturing data in a simple configuration in Q Replication.