This message was deleted.
# general
s
This message was deleted.
y
the debezium pulsar source connectors (mysql, postgres, oracle,mongo …) basically wrap the debzium as embedded mode and db driver together and produce cdc events to pulsar topics.
m
Their debezium server runs independently outside of Pulsar cluster, unlike Pulsar’s source connector which this is how Pulsar Debezium connectors are implemented). Their debezium wasn’t multiple tenant. We pushed a fix to allow to use non-public/default (https://github.com/debezium/debezium/pull/4209).
q
Thanks both. Can you tell me a little more about how it works? Is it the code here? https://github.com/apache/pulsar/tree/master/pulsar-io/debezium It seems like Pulsar connect of debezium is implemented as “embeded engine” of Debezium: https://debezium.io/documentation/reference/2.3/architecture.html#_embedded_engine Is my understanding correct? Thanks
y
yes, debezium relies on kafka as data transport. the pulsar source connector uses debezium embedded mode, pulsar’s kafka source connect (pickup kafka topic) and translate events to pulsar messages. for example, postgres -> (jdbc -> debezium -> kafka -> pulsar kafka connector) -> pulsar topic.
q
Awesome. I really appreciate your help! Also, how does “Pulsar Debezium connector” recover from restarts? I assume it will resume from the last offset that succesfully publish to Pulsar topic
Does it just store the offset in a special topic? and then load it back (using latest) on restart?
m
I can speak for Postgres how it can recover from restarts. Postgres uses something called replication slot to keep track of WAL segments. Before Debezium reads the change, the segments in the slot won’t get deleted. This is implemented in Debezium. You are right that the connector records the position from which it has read changes in WAL. It is recorded and sends to the offset topic. Upon restarting of the connector, it reads the position from the offset topic. It’s the same implementation in Kafka Debezium.
🙏 1
✅ 1
q
Is there any more documentation for configuring debezium for Puslar Debezium source? For example, I want to use this filtering in Debezium, is that possible? https://debezium.io/documentation/reference/2.3/transformations/filtering.html The config in the apache docs is quite limited: https://pulsar.apache.org/docs/3.1.x/io-cdc-debezium/#usage-1
I tried to follow the code in https://github.com/apache/pulsar/tree/master/pulsar-io/debezium It seems like using the debezium is not possible? Seems like Pulsar debezium connect is NOT an debezium embeded engine? It’s just reusing the debezium source connector only… Is that correct? or do I miss anything else.
My actual use case is that I want to limit what are the db tables are needed for CDC. I don’t want to send everything to the Pulsar .
Oh i see a config database.whitelist probably can do it.
Ahh no, this is only on database level.. I need to to make it table level..is that difficult to add that ?
The config said “there are other properties for listing databases and tables to include or exclude from monitoring.” I don’t see anywhere has the tables 😂
m
I use this link as a reference for my source connector config https://debezium.io/documentation/reference/stable/connectors/postgresql.html Underneath it’s Kafka connector