Greetings,
I am using MQTT via Clojure/Machine Head, to connect(subscribe) to The Internet of Things MQTT service and receive messages from my IoT/LoRaWAN device.
With the examples provided I ave been able to subscribe to desired topic and receive messages.
After a short while (1-2 minutes, 1-3 messages) my Clojure code exits, and the program stops, and I am wondering why, and what I can do to stop it exiting.
After the machine head code is run to subscribe and register the callback function, the main program finishes (as per Machine Head examples).
- Would this exit be caused by garbage collection?
- Would a non exiting main function (loop + delay) solve the problem? (I'm about to go try this one.)
Regards,
Paul