|
|
ActiveMessaging
ActiveMessaging is an attempt to bring the simplicity and elegance of rails development to the world of messaging. Messaging, (or event-driven architecture) is widely used for enterprise integration, with frameworks such as Java's JMS, and products such as ActiveMQ, Tibco, IBM MQSeries, etc.
ActiveMessaging is a generic framework to ease using messaging, but is not tied to any particular messaging system - in fact, it now has support for Stomp, JMS (using StompConnect or direct on JRuby), WebSphere MQ, Amazon Simple Queue Service (SQS), and the all Ruby ReliableMessaging.
Here's a sample of a processor class that handles incoming messages:
class HelloWorldProcessor < ActiveMessaging::Processor
subscribes_to :hello_world
def on_message(message)
puts "received: " + message
end
endGetting Started
Here are the best beginner guides:
- Installation - get ActiveMessaging, stomp, and activemq
- TenMinuteIntroduction - quick intro on sending and receiving
Then after you get through that, learn more wih these:
- Configuration - more advanced configuration described
- ExceptionHandling - advice and recipes for better exception handling
ActiveMessaging articles elsewhere
- Processing Pipeline with Amazon S3, SQS, EC2, Ruby, Rails and ActiveMessaging By Philip@AWS, a terrific example of using Amazon SQS with ActiveMessaging for applications that require a large amount of 'heavy-lifting' be handled asynchronously and in a scalable manner on EC2 instances.
- Intro to ActiveMessaging on InfoQ - Still mostly current/complete intro.
- Asynchronous Messaging with Rails - example and explanation of using a13g with AR observers, discussion of a13g as alternative to REST integration.
- Integrating Rails and ActiveMQ with ActiveMessaging/REST - uses ActiveMQ's demo chat app on jetty interacting with a rails app using a13g.
- How to build a mini youtube using activemessaging plugin and amazon s3 - title says it all.
- Publish\Subscribe Messaging with Flex and Rails using Apache ActiveMQ, ActiveMessaging, and STOMP - very cool example of using flex to communicate via stomp.
Developers
Source code is available via subversion here on google code:
svn checkout http://activemessaging.googlecode.com/svn/trunk/ activemessaging
Support
Best bet is the google groups mailing list:
Sign in to add a comment

Hi, Great plugin this one .. I just had a quick question. I am trying to have durable subscribers set up. I have a flex client which is supposed have an active connection with the STOMP server (ActiveMQ). I followed the tutorial and set up a subscriber in rails. I did not setup the options like clientId and subscriptionName as I did for the ActionScript?. How could I do this using the subscribe_to method available ?
I would be great I you could help me with this as soon as possible. Thanks and Regards, Dinesh
Hi dinesh - I tend to answer comments more on our google group list. You'll need the head version of the stomp gem to send clientid, you set that in the connection in broker.yml, and the subscription name in the headers for the subscribes to command.
-Andrew