Use golang language to subsribe mqtt service, but playload message is like picture that. no json format. how to decode payload content body?
Thinks!
By default, integrations are in protobuf format, and use the definitions located in the â/apiâ directory of the ChirpStack repo. Since youâre working in Go, I would recommend sticking with protobuff for performance and strong typing, over flipping it to JSON.
Please note that this configuration is for the application/.....
topics. The data you are looking at is for the gateway topics. You might want to subscribe to application/#
to make sure you are reading the correct data.
Thank you for responseďźWhen I try to parse the payload data, I encounter an error, âcannot parse invalid wire-format data.â How can I handle this issue? Thanks again.
Not every payload that comes off the application topic (top-level) will be an uplink event. You havenât posted the code that you used to subscribe to a topic, so we donât know. See also:
https://www.chirpstack.io/docs/chirpstack/integrations/mqtt.html
https://www.chirpstack.io/docs/chirpstack/integrations/events.html
Topic:application/d2db7767-56a4-4790-a275-61a992b95cdf/device/d896e0ff00000240/event/up
I apologize for the interruption again. After obtaining the payload through MQTT on my end, I attempted to decode it directly using Protocol Buffers (proto). However, I encountered an error as shown in the screenshot. Thank you!