#How to add an actor that uses erlang functions in a surpevisor

1 messages · Page 1 of 1 (latest)

sage pier
#

I'm not familiar with the code, and I've not the time to study these snippets, but you're sending a Publish message to the supervisor

#

It seems like you want to send it to the actor instead

#

My first guess is that there's a bug in the FFI

abstract prawn
#

I am not sure, but it looks as if you start the emqtt client in your builder function, meaning that the parent is the supervisor process. I am wondering if you maybe should use the actor.new_with_initializerfunction instead and put the emqtt start in that start function. In that case your actor will be the parent instead.

sage pier
#

It seems like you’re starting that process unsupervised though

#

The API seems strange, it always sends messages to the parent? That seems like it forces no supervision

lean hull
#

There's also https://github.com/jhillyerd/gemqtt, which wraps emqtt. Were you able to solve the emqtt dependency issue mentioned in the README of that repo, or have they fixed it upstream? That was (funnily enough), one of the things that originally motivated me to write a pure Gleam implementation.