using MassTransit; using Server.Packets; using Server.Services; namespace Server.Consumers; 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; } }