public async Task ExecuteAsync() { foreach (var filePath in fileClient.GetFiles(settings.Value.InputDirectory)) { var message = new AgnosticMessage <byte[]> { Key = filePath.Split('/').Last(), Payload = fileClient.Read(filePath) }; await producer.ProduceAsync("binary", message); logger.LogInformation($"Binary file read and sent: {message.Key}"); } }