//Processando o pagamento utilizando microsserviço com mensageria da RabbitMQ public void ProcessPayment(PaymentInfoDTO paymentInfoDTO) { var paymentInfoJson = JsonSerializer.Serialize(paymentInfoDTO); var paymentInfoBytes = Encoding.UTF8.GetBytes(paymentInfoJson); _messageBusService.Publish(QUEUE_NAME, paymentInfoBytes); }
public void PublicCommand(string commandName) { _messageBusService.Publish(new CommandContact { CommandName = commandName }); }