daadu

daadu

Yet another discussion on having native(some what) MQTT support with Phoenix

I am new to Phoenix (Erlang and Elixir ecosystem in general), I am from an IoT company which does all its stuff in MQTT [current stack is - EMQTT + Paho + Django + Celery + PostgreSQL], basically a broker where all devices are conencted - the backend subscribes to “root topic - #” to get all messages - the messages are handled by celery workers in background. These setup is not so cohorent as too many moving components. Phoenix looks a good setup to do such kind of things - only issue is that the devices uses MQTT (and we dont want to move to any other lib as this one is stable enough).

I went through various threads [thread 1 and thread 2] discussing native “transport layer” support for MQTT with Phoenix. Looks like there is no plan to add it to Phoenix and would require some overhaul (I might have misunderstood).

I have another idea of getting this done - with “MQTT over Websocket” support instead of “native MQTT” support. The lib we use on firmware end has this feature - wrapping MQTT packets with WS packets, not sure how it works exactly. But this would eliminate having a MQTT transport layer support and process the MQTT message later with some custom Plugs.

I am a noob when it comes to Phoenix (Just went through “Getting started in docs” and some YT videos), so forgive my ignorance. But I think this could be a relatively easier option to have MQTT support in Phoenix.

First Post!

kokolegorille

kokolegorille

Hello and welcome,

You might be interested in Brodway, and MQTT connector…

https://github.com/kbredemeier/off_broadway_mqtt

You might build a similar pipeline with…

MQTT connector + Broadway + Phoenix + Task + PostgreSQL

Where Next?

Popular in Discussions Top

Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
nburkley
AWS re:Invent is on at the moment with some interesting announcements. One new feature in particular is the Lambda Runtime API for AWS La...
New
ejpcmac
I have discovered Nix last month and I am currently on my way to migrating to it—both on macOS at home and the full NixOS distrubution at...
New
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
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
rms.mrcs
A couple of days ago I was discussing with a friend about different approaches to write microservices. He said that if he was going to w...
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
100phlecs
Are there any downsides, like perf issues, to putting all functional components in CoreComponents as long as you prefix it with the conte...
New
axelson
Decided against including more info in the title, but the gist is that Plataformatec sponsored projects will continue with the assets bei...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
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
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
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
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
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
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
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
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement