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?