lessless
Looking for a relaible event bus library
Hi,
I’m looking for an event bus library that reliably implements Outbox pattern, i.e. can guarantee that if the publishing function finished its execution, then a message will be delivered at least once to every subscriber.
That includes postponing parent shutdown until getting an acknowledgement from the storage that an event was successfully persisted.
Is there anything like that in the Elixir land?
Most Liked
hauleth
Well, telemetry guarantees that every subscriber function will be called exactly once.
lud
While in a DB transaction that creates some stuff we insert an Oban job (outbox pattern itself).
When the transaction succeeds we can return “OK” from our API and guarantee that the job will be performed at some point since the job was inserted in Postgres.
In the job there is a simple HTTP call to another service or a message published to Kafka. It can be anything.
mgibowski
That might be an overkill for you, but Debezium, so a Change Data Capture solution usually used with Kafka, can be a great fit for that pattern.
It works more or less like this:
- your outbox is a table in your DB, so you write to it with full ACID guarantees,
- Debezium pretends to be a read replica for your DB and observes its transaction log,
- for every change in your DB, Debezium emits an appropriate event to a Kafka topic,
- you can consume those events in other apps.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









