Outbox guarantees
lessless opened this issue · comments
Hi @mustafaturan ,
would you please clarify what are outbox guarantees for EventBus
with PostgreSQL: does is there are promise of at-leat-once delivery if EventBus.notify(event)
returned :ok
?
Is there any node termination logic inside the library that will postpone application shutdown until all data is written to the DB?
Thank you.
And kudos for great work, the library looks solid
event_bus_postgres is a sample library, it is functional but needs a lot of work. I wouldn't rely on it on prod. I recommend working on your own library with solid unit test coverage.
Understood,
So, with the default ETS adapter, when the node shuts down, all events will be lost?
@mustafaturan does this look like an almost drop-in replacement that can give a relaible outbox guarantees https://github.com/michalmuskala/persistent_ets ?
I didn't check the library you have shared based on my needs. In general, I highly recommend do your own research instead of asking to an author about another authors library.
when the node shuts down, all events will be lost?
Yes, that is correct. When the node shuts down all the events will be lost in default ETS storage. You can periodically save the ets tables into files https://www.erlang.org/doc/man/ets.html#tab2file-2 or attach a storage consumer like in event_bus_postgres
.