alex88
I’ve tried multiple mqtt clients and almost no one has ssl client support except exmqtt that wraps emqttc, using that I’ve tried to connect to aws iot using:
{:ok, pid} = Exmqttc.start_link(MqttClient, [], [
host: 'xxxxxx.iot.eu-west-1.amazonaws.com',
port: 8883,
clean_sess: true,
ssl: [
certfile: Application.app_dir(:dem, "priv/mqtt-certificate.pem.crt"),
keyfile: Application.app_dir(:dem, "priv/mqtt-private.pem.crt")
],
auto_resub: true,
reconnect: true
], %{})
Exmqttc.subscribe(pid, "#")
however none of the connect/disconnect callbacks are called. My callbacks module is:
defmodule MqttClient do
require Logger
use Exmqttc.Callback
def init(_params) do
{:ok, []}
end
def handle_connect(state) do
Logger.debug "Connected"
{:ok, state}
end
def handle_disconnect(state) do
Logger.debug "Disconnected"
{:ok, state}
end
def handle_publish(topic, payload, state) do
Logger.debug "Message received on topic #{topic} with payload #{payload}"
{:ok, state}
end
end
does someone have any idea? Is my elixir config correct? (specially the ssl part which I’m not sure is the right elixir counterpart of the erlang code)
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
gausby
I haven’t tried connecting to a amazon hosted MQTT server, but I do have a client called Tortoise, and it does support SSL. Currently it lacks documentation, and I am about to write some; have you tried it? What’s your experience? Where should I focus in the documentation?
I was thinking I should make a “guides” section in the documentation where topics such as connecting to AWS hosted MQTT could be described.
alex88
Thanks for the reply, I went through tortoise but without any doc and since I was in a hurry I’ve just used
) with mosquitto which bridges the client to AWS IOT.
gen_mqtt(which is also yoursBtw regarding documentation a non-ssl/ssl and an handler example (just saw that in the tests) would be more than enough!
gausby
Awesome. Perhaps I should write a macro that will make implementing a
Tortoise.Handlereasier with default implementations for most of the callbacks. Currently I am making an attempt to improve the documentation for Tortoise over at this pull request:Don’t be shy if you have any feedback.
Hris
I red the documentation but I didn’t manage to do the SSL connection with Tortoise. Could you please explain about the options? cacertfile, key, cert. Is it a path? Is it a string of what file contains? what is it ? I couldn’t find documentation for this.
miked
@gausby could you tell me if the Tortoise client supports MQTT v5.0? I know GitHub - jacky-xbb/exmqtt: Elixir MQTT v5.0 Client · GitHub is an Elixir MQTT v5.0 Client compatible with MQTT v3.0.
gausby
Not yet; but hopefully I can get to work on Tortoise at some point in the near future. Sorry I have been away for a long while. Feel free to check out other options. The MQTT 5 version of Tortoise will have a different interface than the one that worked for MQTT 3.1.1, so if you have something working already a slight rewrite of your MQTT parts will be required anyways.