1

I would like to create an event driven architecture in Django. Every time a database record is created, updated or deleted, i would like to create and event, posting it to a queue ( like kafka, sqs, or something similiar).

I know that Django has a post_save method, that I could use to capture the record and post it in a queue, but I suppose that I could suffer for a dual write problem, i.e., update the database, but fails to post message in the queue. Does Django have any different mecanism? Does Django retry the post_save method? Should I use a outbox pattern or process database bin log instead?

p.magalhaes
  • 7,595
  • 10
  • 53
  • 108
  • https://github.com/juntossomosmais/django-outbox-pattern just found a library that helps implementing outbox pattern – p.magalhaes Mar 07 '23 at 00:04

0 Answers0