예제 #1
0
        public void SayHi([FromBody] GreetingRequest greetingRequest)
        {
            var body = new GreetingResult()
            {
                Greeting = $"Hi, {greetingRequest.Name}!"
            };

            var message = new RabbitMessage();

            message.Body = body;

            this.rabbitService.Publish(
                message: message,
                routingKey: "owlery.example.answer",
                exchange: "owlery.example.greeting_exc"
                );
        }