MQTT know if a client is subscribed
<p>The question is already posted, <a href="https://stackoverflow.com/questions/38280283/mqtt-how-a-client-can-get-to-know-that-another-client-is-connected-or-not">Mqtt How a client can get to know that another client is connected or not</a>
and <a href="https://stackoverflow.com/questions/19057835/how-to-find-connected-mqtt-client-details">How to Find Connected MQTT Client Details</a></p>

<p>In my case, if client X is already subscribed in a channel A, client Y can't subcribe to the channel A, until X unsubcribes. I can only have one client subscribed in the channel</p>

<p>Can I also use the idea of retained messages and LWT?</p>

<p>If yes, I don't know exactly from where should I start. It would be good to start with a simple example to see how the retained messages and LWT work. So far, I just have experience in publishing and subscribing but no more.</p>

<p>Could you please, tell me some advises may be some links or examples or any useful information so I can have a starting point.</p>