Debezium or database triggers

902 views
Skip to first unread message

Peter Schuitemaker

unread,
Oct 11, 2019, 6:07:54 AM10/11/19
to debezium
Hi,

We're considering using Debezium for CDC. Being tied to Kafka is a problem for my organisation, since Mule ESB is used as a bus.

An alternative to Debezium + Kafka would be using database triggers (PostgreSQL in my case) implemented in Java, sending JMS messages to Mule ESB.
Could anyone enlighten me to drawbacks using this approach, compared to Debezium?

Thanks,

Peter

Michael

unread,
Oct 11, 2019, 6:36:21 AM10/11/19
to debezium
We use Debezium embedded without Kafka for Postgres. Kafka was too heavy weight for us.
We capture all our cdc events to a local queue which then async pushes to an event broker for distribution. 
Your event broker could be Mule ESB or you could just write your cdc events directly to Mule. 

Triggers are an option but then you coupling your change events with your infrastructure.

Regards
Michael

Gunnar Morling

unread,
Oct 11, 2019, 6:41:37 AM10/11/19
to debezium
What Michael says :)

To add on this, triggers run as part of the TX also impact latency of your OLTP workload and they must be managed and kept in sync in case of schema changes. You can find more info on Debezium's embedded mode here:


And an example of sending to NATS:


Main thing to keep in mind is that you need to persist offsets yourself, but it's not too hard to do. You could use this to send the change events to your ESB.

Hth,

--Gunnar

Peter Schuitemaker

unread,
Oct 11, 2019, 7:34:47 AM10/11/19
to debezium
Thank you gentlemen for the quick replies. This approach looks very promising.

I will set up a PoC for a Spring Boot project with embedded Debezium, writing the CDC events directly to Mule ESB.

Regards,

Peter

Jiri Pechanec

unread,
Oct 14, 2019, 12:17:07 AM10/14/19
to debezium
Hi,

also please look at https://camel.apache.org/components/latest/debezium-component.html It is MySQL only now but it might give you some hints for your implementation too.

J.
Reply all
Reply to author
Forward
0 new messages