6 Comments
User's avatar
Runay Dhaygude's avatar

What we are trying to achieve is a write to DB and also publish to kafka. What if we first publish to kafka and make the DB as one of the consumer to it ? Is this viable ?

Expand full comment
Munashe Njanji's avatar

That's the event driven architecture. It might not be good if you are interested in having immediate consistency as the database may not reflect the latest state immediately after the event is published. So this results in you having stale reads.

Expand full comment
Runay Dhaygude's avatar

Got it!

Expand full comment
Raul Junco's avatar

Thanks Runay for the great question.

Munashe, you beat me on this one, thanks for great answer!

Expand full comment
Saurabh Dashora's avatar

Great article Raul.

We had implemented dual writes using CDC for one of the projects. It was a good outcome overall.

Also, thanks for the mention!

Expand full comment
Raul Junco's avatar

Thanks for sharing, Saurabh!!!

Expand full comment