clear method
Clear method are clears component state. Parameters:
correlationId
(optional) transaction id to trace execution through call chain. Return Future that recive a null when clean compleate Throws error
Implementation
@override
Future clear(String? correlationId) async {
_checkOpened('');
var count = 0;
if (_queue != null) {
count = _queue!.messageCount;
await _queue!.purge();
}
logger.trace(
correlationId, 'Cleared %s messages in _queue %s', [count, name]);
}