Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

efficient way of sending binary JPEG data over MQTT

176 views
Skip to first unread message

Tarkan DOGU

unread,
Mar 20, 2023, 3:36:18 PM3/20/23
to MQTT
Hi Folks,

How can I send efficently burst of JPEG binary image data over MQTT protocol? I don't want to use base64 encoding. I am publishing JSON data over MQTT.
thanks for advance...
Kind Regards, Tarkan

Andy Stanford-Clark

unread,
Mar 20, 2023, 5:53:26 PM3/20/23
to 'Simon Walters' via MQTT
MQTT is “payload agnostic” - just send the binary jpeg data in the payload. No need to encode it.

Although if what you meant is that you want to embed JPEG image data as a field in a JSON payload, 
1) don’t, 
2) if you must, you will have to base64 encode it to a JSON string.

Maybe send the binary JPEG data on a different topic to the JSON ?

Andy

--
To learn more about MQTT see https://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/a97c72a9-857f-48d4-bd80-e7fcdafd6050n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages