using MassTransit; namespace Server; public class PacketConsumer : IConsumer { private readonly PacketDistributorService _distributorService; public PacketConsumer(PacketDistributorService distributorService) { _distributorService = distributorService; } public Task Consume(ConsumeContext context) { return _distributorService.AddPacket(context.Message); } }