Fork me on GitHub
#iot2017-02-18
>
nblumoe15:02:12

@michaelklishin @holyjak I started working with MQTT from Clojure today. I was wondering if you have any hints for decoding the message payload. I think clojurewerkz/machine-head does not do anything for that. Do you have plain custom decoders for the binary message? Are you using Java Paho for decoding? Something else? Help and hints highly appreciated 🙂

nblumoe15:02:54

Ok, digging a bit deeper this might not make too much sense. The payload which gets passed to the subscriber callback in machine_head already is the real, variable length payload, right? So no need to fiddle with the remaining length calculations but just parse the payload binary as needed (which is application/message specific anyways).

nblumoe15:02:25

The latter could be done with gloss, buffy etc.

nblumoe15:02:34

Does that align with how you handle it?