We're using rumqttd against devices that uses v4 protocol and do not always disconnect gracefully. It appears in this circumstance, the broker never reports a disconnect notification as would be expected here:
link_tx.subscribe("#").unwrap();
loop {
let notification = match link_rx.recv().unwrap() {
Some(v) => v,
None => continue,
};
match notification {
Notification::Forward(forward) => println!("forward"),
Notification::Disconnect(d, props) => println!("disconnect: \n{d:#?}\n{props:#?}"),
v => println!("{v:?}"),
}
}
We also start processes based on a client id, so not having access to that information when the client is no longer connected is a pain point this also solves by passing in the id for the disconnected client to the handler.
This is related to #775 .
Type of change
New feature (non-breaking change which adds functionality)
Checklist:
[x] Formatted with cargo fmt
[x] Make an entry to CHANGELOG.md if it's relevant to the users of the library. If it's not relevant mention why.
We're using rumqttd against devices that uses v4 protocol and do not always disconnect gracefully. It appears in this circumstance, the broker never reports a disconnect notification as would be expected here:
We also start processes based on a client id, so not having access to that information when the client is no longer connected is a pain point this also solves by passing in the id for the disconnected client to the handler.
This is related to #775 .
Type of change
New feature (non-breaking change which adds functionality)
Checklist:
cargo fmt
CHANGELOG.md
if it's relevant to the users of the library. If it's not relevant mention why.