|Re: [paho-dev] Using the paho.mqtt.client library to select the name from the schema.|
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:
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?
_______________________________________________ paho-dev mailing list paho-dev@xxxxxxxxxxx To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev-- Ian Craggs Eclipse IoT PMC; Eclipse Paho Project Lead; OASIS MQTT TC Member
paho-dev mailing list
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev
Back to the top