Transactional outbox pattern, apply or not to

Posted by Aki59@reddit | ExperiencedDevs | View on Reddit | 17 comments

Our one microservice is implemented with a classic dual write problem. They are updating dynamodb table status to received first and then sending message to sqs. If messege sending failed then in catch block we are again calling dynamodb to update the status as failed.

My rationale:

To use aws dynamodb stream push event to eventbridge and then to sqs.

Only drawback is it will incur extra cost and effort.

Their rationale:

1.Pushing to sqs rarely or never fails and even if it fails then updating db will not fail almost always (it just never happens). I also think that it will work 99 percent of the time.

2.They say even if it fails we are logging error message which will trigger alert to prod support which can manually mark the status to failed.

I do believe outbox pattern is a clear pattern to be implemented but how to counter the above points is a challenge.