protected override Task ExecuteAsync(CancellationToken stoppingToken) { logger.LogInformation("Starting consuming messages..."); mqConsumer.MessagedReceived += RabbitMqConsumer_MessagedReceived; mqConsumer.Start(nameof(ExpensesHistoryHostedService), AllEventsRoutingKey); return(Task.CompletedTask); }
protected override Task ExecuteAsync(CancellationToken stoppingToken) { logger.LogInformation("Starting consuming messages..."); mqConsumer.MessagedReceived += RabbitMqConsumer_MessagedReceived; mqConsumer.Start(nameof(StatementCreatorHostedService), nameof(InvoiceCreatedEvent)); return(Task.CompletedTask); }