Outbox pattern and Inbox pattern is not guaranteed your delivery as well. How can i be safe for the message broker?

485 views Asked by At

There is an event and I want to make sure it delivered.

You know, in the outbox pattern, we save the event to the db before sending it to the message broker and delete it after publishing.

However, if I apply it in inbox pattern, we first read the message from the broker on the consumer side and delete it after the transaction.

But my problem is, there are 100 pending events on the message broker right now, and just in the meantime, the message broker crashed and the events disappeared. These events are not in my Outbox table because I deleted them when it was published. It is not in my inbox table because the consumer has not read it yet.

How can I solve this situation?

0

There are 0 answers