Search code examples
mqtt

How to get notification content with rabbitmq_event_exchange or something else like subscribe system topic


Each event has various properties associated with it. These are translated into AMQP 0-9-1 data encoding and inserted in the message headers. The message body is always blank.link

I use the python library paho-mqtt, and there are no headers on the on_message callback and the payload is of course blank. My question is how can I know which client/queue/exchange produce the event I receive?

If this plugin can't provide the feature that I want, is there any replacement solution exists? Such as a system topic, which can provide more details about concerned event.

Update:

Sorry for my confusing question.

Since I just want to get notification when a MQTT client changes online/offline status. Now I find the interface of MQTT Client "will_set" which meets my need.

I will remove the tag "rebbitmq".


Solution

  • You should be using an AMQP client like Pika. There's no need to use MQTT.