As a mqtt client connected to mosquitto is it possible to retrieve a list of client IDs who are also connected to the broker?
A good work-around for this is to have the clients(if possible) define a Last will and testament(LWT). Your server will subscribe to a special topic where the LWT will be published to and assume all clients as online unless they publish to that topic.
MQTT what is the purpose or usage of Last Will Testament?