title: In MQTT, how does the broker get notified of a client's Last Will and Testament?
body: <p><strong>Problem:</strong>
  If everything in MQTT is pubsub but it feels like for Last Will and Testament (LWT) to work there would have to be Long polling from some end?</p>
  
  <p><strong>Question:</strong>
  In MQTT, How does broker know when a client goes off line? 
  And what's the flow on LWT notifying the broker, is it long polling?</p>
  
  <p><a href="http://eclipse.org/community/eclipse_newsletter/2014/february/article2.php" rel="nofollow">last will test documentation</a></p>
  
  <blockquote>
    <p><strong>Last Will And Testament MQTT</strong> clients can register a custom “last will
    and testament” message to be sent by the broker if they disconnect.
    These messages can be used to signal to subscribers when a device
    disconnects.</p>
  </blockquote>