This library is a client application for MQTT @gausby . It works fine for single subscription but not working fine for shared.
This is the code
def start(_type, _args) do
import Supervisor.Spec
Tortoise.Supervisor.start_child(
client_id: "my_client_id",
handler: {MqttManager.Handler, []},
server: {Tortoise.Transport.Tcp, host: 'localhost', port: 1883},
subscriptions: [{"$share/d/+", 0}, {"d/+", 0}]
)
This is the handler code
def init(args) do
{:ok, args}
end
def connection(status, state) do
{:ok, state}
end
def handle_message(topic, payload, state) do
{:ok, state}
end
def subscription(status, topic_filter, state) do
{:ok, state}
end
def terminate(reason, state) do
:ok
end
When i test it with single subscription It works fine giving me payload and topic information
Tortoise.publish("my_client_id", "d/dev","d/dev msg" , qos: 0)
When i try to test shared subscription it gives me no error or error message just this and no topic and payload information
Tortoise.publish("my_client_id", "$share/d/dev","$share/d/dev msg" , qos: 0)
:ok
Any suggestions?
Thanks