How do you measure latency for a replicated table?
Problems with capture process, reader process, import process or Post process can result in latency in the queues.
1) Replicate a demo_table from source to the target. You could have a demo table for each of the queues you want to measure latency.
2) On Source, demo_table should have one column col1 (date field).
3) Populate col1 continuously using a cron job inserting a row (SYSDATE as column value) into the table at regular intervals.
4) On the target, demo_table should have two columns col1 and col2 of type date. col1 is replicated column from source to target and col2 use default, SYSDATE on target.
5) Latency of replication can be measured by the difference between the two column values on target.
Note: Operating system and Database issues can be the reason for latency too.