Railo allows you to write your own event gateway types in CFML, which is pretty nice. For more info:
http://wiki.getrailo.org/wiki/3-2:Create_your_own_Event_Gateway_type (note that some of the directories referenced in this post have changed since it was written)
I’m writing an event gateway that listens to Amazon Web Services SQS (Simple Queue Service) queues, which is similar to Active MQ. Here’s some good posts on creating event gateways for Active MQ:
When you set this up, you write a driver that shows what values to grab for the instance of the gateway. You write a gateway; this is where the logic for starting/stopping etc is defined. You also write a listener: this is specific to the gateway instance (listener a for queue a, listener b for queue b, each with their own logic)
After you’ve written your driver (and restarting – my experience was you had to restart the underlying Java container, such as Tomcat; restarting Railo in admin didn’t do the trick), you then see the driver listed in the Railo Web Administrator, where you provide an ID.
I’d like to do a convention over configuration thing: on the next screen, where I provide CFC to execute, queue name, I’d like to match it to my ID. The screen typically looks like the following, based on what you’ve put in your gateway CFC.
I want to provide some sensible default: the listener would be maybe “myMapping.#ID#” and the queue name would be the same as the ID. Looking at screen 1′s source, i see the the form field is _id. Cool, easy, right?
|1 2 3 4||