Ejemplo n.º 1
0
        //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);
        }
Ejemplo n.º 2
0
 public void PublicCommand(string commandName)
 {
     _messageBusService.Publish(new CommandContact {
         CommandName = commandName
     });
 }