private async Task VotingReviewConsumerReceivedAsync(object sender, RabbitQueueConsumerData e) { var method = "votingReview"; var json = JsonSerializer.Deserialize <VotingReviewModel>(e.Data, jsonSerializerOptions); await hubContext.Clients.All.SendAsync(method, json); e.Channel.BasicAck(e.DeliveryTag, false); }
public async Task SystemTimeConsumerReceivedAsync(object sender, RabbitQueueConsumerData e) { var method = "systemTime"; var json = JsonSerializer.Deserialize <SystemTimeModel>(e.Data, jsonSerializerOptions); await hubContext.Clients.All.SendAsync(method, json); e.Channel.BasicAck(e.DeliveryTag, false); }
public async Task PresentMembersConsumerReceivedAsync(object sender, RabbitQueueConsumerData e) { var method = "presentMembers"; var json = JsonSerializer.Deserialize <PresentMembersModel>(e.Data, jsonSerializerOptions); SaveDataToCache(method, json); await hubContext.Clients.All.SendAsync(method, json); e.Channel.BasicAck(e.DeliveryTag, false); }
public async Task VotingEndConsumerReceivedAsync(object sender, RabbitQueueConsumerData e) { var method = "votingEnd"; var json = JsonSerializer.Deserialize <VotingEndModel>(e.Data, jsonSerializerOptions); var result = PrepareVotingEndData(json); await hubContext.Clients.All.SendAsync(method, result); e.Channel.BasicAck(e.DeliveryTag, false); }