namespace Server.Consumers; using MassTransit; using Packets; using Services; public class PacketConsumer : IConsumer { private readonly PacketDistributorService distributorService; public PacketConsumer(PacketDistributorService distributorService) => this.distributorService = distributorService; public Task Consume(ConsumeContext context) { this.distributorService.AddPacket(context.Message); return Task.CompletedTask; } }