Skip to end of metadata
Go to start of metadata

Introduction

GroovyJMS provides set of Groovy-style APIs, enhanced JMS API with TMPGroovy 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:

And a complex one:

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

Or check other information at:

2 Comments

  1. 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).

  2. Personally, i do not think it's should use Spring JMS Template. Reasons are:

    • From my past xp in a banking project that use Spring JMSTemplate and also messeging products like TibRV, I think JMSTemplate is really useful to make the life of Java developers easier. But in a Groovy project, it no longer provide such benefit, and IMHO, it's actually make things unnecessarily complex. At a high level, unlike Java, Groovy allows concise programming that make it less important to do things by configuration. And Groovy have many features that make the use of JMSTemplate quite unnecessary. e.g. it's easy to use a Closure as a listener and attached any function to any class with Category.
    • Groovy does not depend on Spring. It could be ok for Grails JMS Plugin to utilize Spring JMS features, but not GroovyJMS

    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!