endListen method
Ends listening for incoming messages. When this method is call listen unblocks the thread and execution continues. Parameters:
correlationId
(optional) transaction id to trace execution through call chain. Return Future that recive a null when all done Throws error
Implementation
@override
Future endListen(String? correlationId) async {
if (_consumer != null) {
try {
await _consumer!.cancel();
} catch (ex) {
logger.error(
correlationId, ex as Exception, 'Error while closing consumer.');
}
}
}