0

I'm using MQTT as message broker&queue in my project because we are communicating with embedded.

I'm connecting to MQTT from my organizer and I need to know which devices connected to broker already. So, I need to list subscriber list as a subscriber. Or something like that, which one will tell me which subscribers connected.

1 Answers1

0

You don't (at a pure MQTT protocol level).

There could be anywhere from 0 to infinite subscribers to a topic when a client publishes a message. There might also be persistent subscriptions to a topic for a client which is currently offline but will have the message delivered if/when they reconnect.

This all fits with the pub/sub work flow which is intended to totally decouple producers from consumers.

You can build systems on top of the protocol, using retained messages and Last will and Testaments, but that is entirely down to you to build what you want.

hardillb
  • 54,545
  • 11
  • 67
  • 105