AndyL

AndyL

RabbitMQ In-Process?

I’d like to run RabbitMQ in-process, in an Elixir umbrella app.

Is this possible? Can anyone point me to demo implementations and/or documentation?

Most Liked

dimitarvp

dimitarvp

Why uncommon? Sqlite for example is always run in-process.

AndyL

AndyL

Uncommon? Consider: ETS vs Redis, Cowboy vs. NGINX

In-process apps like ETS and Cowboy can simplify testing, deployment, monitoring and recovery.

The use case is for AMQP clients to attach to my in-process RabbitMQ (if possible).

Last Post!

bottlenecked

bottlenecked

Hi, I think I see where you’re going with this; TLDR is I haven’t had any experience with such a setup and I’m sorry I can’t be of more help here.

But perhaps the other examples you mentioned are not directly comparable with this use case:

  • Cowboy / NGINX: HTTP is stateless, so shutting the server down should not impact your business other than availability of that node during restarts (like when deploying)
  • ETS / Redis: I assume that since you mention ETS and not DETS data stored there is transient (eg. like a cache) and you would not care about them being lost, so again node restarts should not have too much of an impact on your business other than perhaps minor hiccups while the caches are warmed up

But I’m not sure what guarantees one should expect from an in-proc RabbitMQ instance that maybe restarted at any time. Because in that case that would probably mean that you do not care about messages being lost on restarts, which is perhaps valid in IOT scenarios but then you might not need to carry around RabbitMQ as a dependency. If you do care about preserving messages, then you’d need to provide access to some type of permanent storage (eg. disk) for your nodes, which can be pretty limiting when deploying/scaling containers for example, and would be better off perhaps having a stable RabbitMQ VM / cluster that you’d setup once and then forget about it.

Anyway, sorry for the rant. I hope someone else here who has more experience in this matter can chime in.

Where Next?

Popular in Questions Top

hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
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
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
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
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 31525 112
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement