close method
Closes component and frees used resources.
correlationId
(optional) transaction id to trace execution through call chain.
Implementation
@override
Future close(String? correlationId) async {
if (connection_ == null) {
return;
}
connection_!.disconnect();
connection_ = null;
subscriptions_ = [];
logger_.debug(correlationId, 'Disconnected from MQTT broker');
}