Hi -
There's no one size fits all answer.
The most common way is to take an extract from the MySQL source
and compare that using some unique-identity means with your
target. If your target is your Kafka topics, you'd need to
guarantee that you have infinite retention so that you have at
least the last logical event for a given primary key in the topic.
But this is rarely the case, so your target will most likely be
whatever your destination system is for your change consumer.
As for metrics, yes the connector does maintain counts for number
of events seen, broken down by create, update, and deletes on
newer versions. However, metrics don't persist across connector
restarts, so these are not going to be as useful if you need to
look across a long time period.
As for a sidecar, no one has specifically mentioned that across
all our support channels, but it's possible someone may have in
some capacity. As for pitfalls, the only thing I would watch for
are changes to primary keys. In transaction logs, this is seen as
a singular logical event, but Debezium emits this operation as two
logical events (1 delete for the old primary key, and 1 create for
the new primary key). So when you're looking at metrics or doing
comparisons at the binlog level, just be aware of certain nuances
like this.
Hope that helps.
-cc