Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using MassTransit;
namespace MassTransitTest
{
public class SendOrderConsumer : IConsumer<Order>
{
private readonly ILogger<SendOrderConsumer> _logger;
public SendOrderConsumer(ILogger<SendOrderConsumer> logger)
{
_logger = logger;
}
public Task Consume(ConsumeContext<Order> context)
{
_logger.LogInformation($"Received order data: {context.Message.Data}");
return Task.CompletedTask;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.