You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB
C#

using EntrustSettle.Common;
using EntrustSettle.EventBus.EventHandling;
using EntrustSettle.IServices;
using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks;
namespace EntrustSettle.EventBus
{
public class BlogQueryIntegrationEventHandler : IIntegrationEventHandler<BlogQueryIntegrationEvent>
{
private readonly ILogger<BlogQueryIntegrationEventHandler> _logger;
public BlogQueryIntegrationEventHandler(ILogger<BlogQueryIntegrationEventHandler> logger)
{
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
public async Task Handle(BlogQueryIntegrationEvent @event)
{
_logger.LogInformation("----- Handling integration event: {IntegrationEventId} at {AppName} - ({@IntegrationEvent})", @event.Id, "EntrustSettle", @event);
ConsoleHelper.WriteSuccessLine($"----- Handling integration event: {@event.Id} at EntrustSettle - ({@event})");
await Task.Delay(100);
//await _blogArticleServices.QueryById(@event.BlogId.ToString());
}
}
}