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

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

            return(Task.CompletedTask);
        }