The Q Capture and Q Apply programs
It is the Q Capture and Q Apply programs, which form the heart of Q replication as it is these two programs, which read transactions from the source system and apply them to the target table.
The Q replication constituent components section from Chapter 1, gave a brief introduction to the Q Capture and Q Apply programs. What we will do in this section is examine at a deeper level how these programs work and communicate with each other.
Q Capture internals
Let’s review what Q Capture does. Essentially, Q Capture reads transactions for tables that it is interested in from the DB2 log by its transaction thread calling the DB2 log interface API db2ReadLog
. It builds complete transactions in memory until it detects a commit or rollback statement in the log. If it detects a rollback statement, then the transaction is flushed from memory. If it detects a commit statement, then Q Capture places the transaction in compressed XML format onto a WebSphere MQ queue called...