as far as MQTT is concerned, the payload is just a byte string.
MQTT doesn't know anything about the format. You need to look
into how the message was sent, and how you would decipher it
whether it was sent via MQTT or not.
On 04/05/2020 18:05, Veena Ghorakavi
wrote:
Hi,
Using the paho.mqtt.client library, how can I select the
name from the AVRO schema? The code I am working utilizes the
skeletal code found on https://www.eclipse.org/paho/clients/python/.
The function, on_message, is where I have been trying to
select for the name.
def on_message(client, userdata, msg):
print(str(msg.payload))
I have tried to find the name value from the message
payload and from the client. I am unable to select for the
name value using the paho.mqtt.client library. I have been
writing the payload to a JSON/AVRO object and selecting the
value using "name" as the key. Is there any capability to
select for the name using the paho.mqtt.client library?