Introduction
GroovyJMS provides set of Groovy-style APIs, enhanced JMS API with Groovy Categories, and a powerful JMSPool bean, that make it very easy to use JMS in Groovy application. It transparently handle connection and session lifecycle, and adds some thread-safe convenient methods to the JMS APIs.
Take a simple example:
jms{
"loginService".send [user:'groovy', password:'jms']
// or [user:'groovy', password:'jms'].sendTo "loginService"
}
And a complex one:
// create a JMS Thread Pool with 10 threads at max def pool = new JMSPool(maximumPoolSize:10) // subscribe to three destinations, each with 2 threads pool.onMessage([fromQueue:['queue0','queue1'],fromTopic:'topic0',threads:2]){ m -> println m}
This module is in its early stage. The provided example are fully functional, but some relatively complex scenario may require directly JMS API usage
You may visit the v0.1 page or the latest v0.2 docs
- GroovyJMS - v0.1 Docs and Example| svn v0.1
- GroovyJMS Docs- v0.2 is in svn trunk | svn trunk
Or check other information at:
- GroovyJMS Roadmap and Planning - Roadmap, Planning, and JMS API support status
- GroovyJMS Design Docs - Draft
- Groovy Messaging Service API - Summary of latest discussion
- GroovyJMS Reference Links
Comments (2)
Oct 08, 2008
James Strachan says:
for concurrent consumption, pooling and support for declarative transactions you...for concurrent consumption, pooling and support for declarative transactions you might want to consider also integrating the spring-jms abstractions (particularly the JmsTemplate for sending or MessageListenerConsumer for consuming).
Oct 09, 2008
Mingfai Ma says:
Personally, i do not think it's should use Spring JMS Template. Reasons are: F...Personally, i do not think it's should use Spring JMS Template. Reasons are:
The above are just my opinion and if many people want any Spring JMS features and we are not able to provide in simple Groovy way, it's ok to utilize Spring. Please join the discussion in the groovy-dev mail list!