(Quick Reference)

3 Sending Messages - Reference Documentation

Authors: Jeff Brown, Peter Ledbrook

Version: 1.0.0

3 Sending Messages

The plugin adds a method named rabbitSend to all Grails artefacts (Controllers, Services, TagLibs, etc...). The rabbitSend method accepts 2 parameters. The first parameter is a queue name and the second parameter is the message being sent.

class MessageController {

def sendMessage = { rabbitSend 'someQueueName', 'someMessage' … } }

Messages may also be sent by interacting with the RabbitTemplate Spring bean directly. See the Using The RabbitTemplate Directly section for more information.