protected override async Task ExecuteAsync(CancellationToken cancellationToken) { _logger.LogDebug("Starting ReceiveLogsService.ExecuteAsync"); while (!cancellationToken.IsCancellationRequested) { // TODO(hekj): Should the below method be async as well? _messageConsumer.ConsumeMessages(); _logger.LogDebug("Sleeping for 5 seconds..."); await Task.Delay(TimeSpan.FromSeconds(5), cancellationToken); } }