5 Using The RabbitTemplate Directly - Reference Documentation
Authors: Jeff Brown, Peter Ledbrook
Version: 1.0.0
5 Using The RabbitTemplate Directly
Most of the interaction with the RabbitMQ server is being handled by an instance of RabbitTemplate. For many applications this is happening at a lower level than the application needs to be concerned with. The plugin does provide a Spring bean to the application context that is an instance of theRabbitTemplate
class which may be used directly. The bean name is rabbitTemplate
.class MessageController { def rabbitTemplate def sendMessage = { rabbitTemplate.convertAndSend('someQueueName', 'someMessage) … } }