Atlas triggers vs Apache Kafka

When do you recommend using Atlas triggers instead of Apache Kafka? Or should we use both?

Good question. Providing some background here but if you want to share your scenario a bit more, we can help narrow the choice.

There are different types of triggers and one of the most commonly used types is Database Triggers. This allows you to write code that is executed in response to actions on a collection. If you are looking to execute code (possibly interacting with / changing an external system) on an event, this is a very simple way to do it.

Triggers are built on change streams, so if you are looking for more control / flexibility on the change events, you can also code against change streams as an alternative.

When it comes to Kafka, our Source Connector also uses change streams to publish change events to a Kafka topic (commonly used for CDC). If you have Kafka infra in place, and that is the way you publish & consume events between systems, the Connector is a good option.