Last active
June 13, 2020 14:03
-
-
Save viktors-telle/b90c74bbc21f243709779f3715fdf14d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MassTransit; | |
using MessageOutbox.Outbox; | |
using Microsoft.Extensions.Logging; | |
using System.Threading.Tasks; | |
namespace MessageOutbox.Consumer | |
{ | |
public class MessageConsumer : IConsumer<IMessage> | |
{ | |
private readonly ILogger<MessageConsumer> logger; | |
public MessageConsumer(ILogger<MessageConsumer> logger) | |
{ | |
this.logger = logger; | |
} | |
public Task Consume(ConsumeContext<IMessage> context) | |
{ | |
logger.LogInformation($"Message with ID \"{context.Message.Id}\" consumed."); | |
return Task.CompletedTask; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment