9. Februar 2012

Apache Camel plug-in for Grails

The Apache Camel Grails plug-in allows you to send and route messages to a wide variety of destination endpoints directly from your controllers and services. It also provides a new Grails artifact, Routes, to configure your routes using known Enterprise Integration Patterns via the Apache Camel Java DSL.

It is quite easy to route messages. For example, write a Grails service like this:

class MyService {
    def myMethod(fooBarText) {
        log.info “Got text: ${ fooBarText }}
}

Then, using Camel’s bean integration, you can deliver messages from an in-memory queue directly to that Grails service:

from(“seda:my.queue).filter {
    it.in.body.contains(“FooBar”)
}.to(“bean:myService?methodName=myMethod”)

Cool, isn’t it? As usual, you can find more info on the plugin page on grails.org.

Diese Artikel könnten Sie noch interessieren:

  1. I18N-Problem in Grails Wenn man eine mehrsprachenfähige Webanwendung erstellen will, unterstützt Grails recht...
  2. Grails-Plugin: ReCaptcha Bei der Entwicklung von Webanwendungen möchte man sicherstellen, dass sich...
  3. Tomcat behind Apache 2 reverse proxy Today, I wanted to set up a Tomcat engine that...
  4. Grails-Plugin: iCalendar Builder iCalendar ist ein allgemein anerkanntes Format zur Übertragung von Kalender-Ereignissen...
  5. Grails Paypal Plugin V0.4 released Today, I released the Grails Paypal Plugin again, the new...

Ihre Meinung ist uns wichtig

*