bill.c

bill.c

RabbitMQ with or without GenStage/Flow

I am beginning a proof of concept for an internal application to help promote Elixir. I would like to showcase the power and performance of the language platform. I have an existing messaging application using RabbitMQ. My thought were to build a publisher and consumer to connect with the existing implementation.

GenStage and Flow seem to provide value with this architecture pattern. However, as I am new to GenStage/Flow and RabbitMQ specifically, I am curious if introducing GenStage/Flow is redundant or an unnecessary abstraction.

Would you recommend using the Elixir capabilities on top of RabbitMQ? Or are the native features of RabbitMQ far superior to what could be demonstrated by GenStage/Flow?

Thanks for the advice.

Most Liked

matteosister

matteosister

I think that RabbitMQ is a good tool to manage back pressure, unless you have a very huge amount of data that needs to be handled really fast to the workers to not saturate RabbitMQ itself.
And also, rabbit workers, adopt a “push” pattern, so by adopting a back pressure system like GenStage, where you “pull” messages from rabbit, you are using it in a really strange way. There is already prefetch count and prefetch size from the amqp protocol that works pretty well with back pressure.

I think that a postgres table (with Repo.stream) or a big file could be a better example. A situation where the amount of data that comes in could eventually saturate your application and slow everything down.

bill.c

bill.c

Thanks for the explanation. I did feel like I was trying to connect the positive ends of two magnets, but thought maybe there was some justification or specific use case.

matteosister

matteosister

maybe someone has an example where the two technologies could work well togheter. So far I didn’t find it :slight_smile:

Where Next?

Popular in Questions Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30877 112
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement