Open kinghuang opened 8 years ago
This seems related to the proposal in #54 to have messages include a "type" field that would explicitly distinguish inserts, updates and deletes: i.e. instead of {"value": "hello"}
, you'd get {"type": "insert", "value": "hello"}
. Then the Kafka consumer could filter to get only inserts.
For tables with a primary key, Bottled Water transmits the table row as the message for inserts and updates, and a message value of null for deletes. In tables that don't have a primary key (or replica identity index), Bottled Water has an --allow-unkeyed option where inserts and updates are sent to Kafka as messages without a key, and deletes are not sent to Kafka.
I'm working in tables that contain log rows from an application (same database as #110). The tables have primary keys. However, I'm only interested in inserts and updates, not deletes. It would be useful to have an option for Bottled Water to not send deletes for tables with a primary key, similar to the behaviour when working with a table without a primary key.
Summary