python - paho.mqtt find out who sent the payload -
i'm trying use paho.mqtt python (project pages) , works nice. problem have find useful find out had sent message. looked source code not quite head around if client variable passed within on_message client use connect or details of client published message (i'm guessing it's first option).
so question - possible find out (the user name) had sent message?
the mqtt protocol designed light weight possible, means message header contains absolute bare minimum deliver message specific topic. there no room in header else.
mqtt pub/sub protocol, 1 of key features of type of protocol decouple publisher subscriber as possible. means publisher shouldn't care how many subscribers there , subscribers shouldn't care information comes long topic it's interested in.
if want more information other message topic have add payload yourself.
Comments
Post a Comment