Sanjibukai

Sanjibukai

Message Queue or an Event Bus system?

Hello everybody,

I tend to see Message Queues (like RabbitMQ) being relevant when we want to make communicate different apps through events (the apps might be running on different servers or as microservices or even on client apps).

However (and hopefully) with Elixir apps I tend to have one single “app” (maybe umbrella apps) and in this case the Message Queue system might be more of what we are calling an Event Bus..

So I wanted to know if it still makes sense to use a Message Queues (like RabbitMQ) in this context?
Or does it better to use some kind of Elixir baked solutions (GenServers, Phoenix PubSub, some external library like event_bus)?

I would love to hear if you are using Event Bus and if so what you are using?

Most Liked

randito

randito

I think if you’re crossing lines – where a line might be a different language, a different node, a different speed of execution – then something like RabbitMQ might be a better choice. It’s got clients in lots of different languages.

stefanchrobot

stefanchrobot

If you decide to hide it behind some kind of interface (e.g. MyApp.EventBus) you can pick whatever tool works for you. Then I think it boils down to whether you need persistent events and the expectations towards latency between sending and receiving the event.

dimitarvp

dimitarvp

Umbrellas don’t prevent you from sending messages to other processes without using any external message queue software.

As @stefanchrobot said, it depends if you want persistence. If you don’t, plain old GenServers will serve you more than adequately enough.

Where Next?

Popular in Discussions Top

rower687
Hi all, I’ve been reading a lot about the “let it crash” term and how supervising processes and the whole messaging passing make an elixi...
New
pillaiindu
In django there is a cache framework backed by memcached. Rails also puts a lot of emphasis on caching, and even the idea of russian-doll...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
eteeselink
Hi all, In the last days, two things happened: A blog post titled “They might never tell you it’s broken” made the rounds. It’s about ...
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
paulanthonywilson
I like Umbrella projects and pretty much always use them for personal Elixir stuff, especially Nerves things. But I don’t think this is ...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement