Skip to content
Grails plugin to integrate ActiveMQ
Groovy
Latest commit f6b9761 Jan 25, 2015 @domix added changelog
Failed to load latest commit information.
grails-app/conf added configuration with Spring Java config, upgraded to latest Activ… Jan 25, 2015
scripts First import Oct 11, 2008
src/groovy/com/domingosuarez/grails/plugin/activemq
.gitignore added plugin.xml to ignore list, removed web-app assets from the fina… Jun 19, 2012
ActivemqGrailsPlugin.groovy added configuration with Spring Java config, upgraded to latest Activ… Jan 25, 2015
History.md
LICENSE.txt added licence file Jan 15, 2011
README work done for GPACTIVEMQ-3 Apr 3, 2011
application.properties

README

Note:

The official documentation is locate at: http://grails.org/plugin/activemq


grails-activemq is a plugin to embedded in a Grails application ActiveMQ for messaging. This release is very simple, in futures releases we provide mayor support for ActiveMQ advanced configuration.

This plugin can be used in conjuntion with jms plugin to develop MDP (Message Driven Pogos).

==Code==
Plugin code is located at GitHub: http://github.com/domix/grails-activemq
If you wish to contribute, feel free to get a GitHub Account, fork the code, do your hacks and pull request.


==Authors==

* Domingo Suarez Torres

==Installation==
'grails install-plugin activemq'

Recomended aditional configuration:
'grails install-plugin jms'

==Configuration==
Out of the box the plugin is fully configured to run in the local Grails application VM at port 61616. Be aware of port availability in your system. In a future release, we provide a configuration to change the port and other setting at convenience.


==Out Of The Box Spring Beans==

* jmsBroker: ActiveMQ itself
* connectionFactory: a Connection Factory to JMS Broker
* jmsTemplate: the Spring Template to send and receive messages


==Mini Tutorial==

Follow this simple steps:

1. grails create-app demoActiveMQ
2. cd demoActiveMQ
3. grails install-plugin activemq
4. grails install-plugin jms
5. grails create-controller notification
6. Edit NotificationController to this:
	class NotificationController {
		def index = {
			def message = "Hi, this is a Hello World with JMS & ActiveMQ, " + new Date()
			sendJMSMessage("queue.notification", message)
			render message
		}
	}
7. grails create-service onNotification
8. Edit OnNotificationService to this:
	class OnNotificationService {
		boolean transactional = false
		static exposes = ['jms']
		static destination = "queue.notification"

		def onMessage(msg) {
			println "GOT MESSAGE: $msg"
		}
	}
9. grails run-app
10. Browse to: http://localhost:8080/demoActiveMQ/notification
11. See result on console.
Something went wrong with that request. Please try again.