Friday, July 10, 2009

Active MQ and ROR

Pre-Installation Requirements

1. Java 5

2. Apache

3. JAVA_HOME environment variable must be set.

Installation Process

For Windows :

1. download the latest release of activeMQ from activemq.apache.org/

2. extract the downloaded file

For Linux :

1. download the latest release of activeMQ from activemq.apache.org/

2. tar zxvf activemq-x.x.x.tar.gz

Start ActiveMQ

First go to your activemq directory

> cd [activemq dir]\bin

Change the permission if needed

> chmod 755 activemq

for windows :

> activemq

For linux :

> bin/activemq

or

> bin/activemq > /tmp/smlog 2>&1 &;

For running the process as background process

> nohup bin/activemq > /tmp/smlog 2>&1 &

 
  Testing the process   
    

> netstat -an|find "61616" (for window)

      
                Or
 
           > netstat -an|grep 61616    (for linux)
        
             As default port of activemq is 61616
 

Monitoring Active MQ

From web console anyone can monitor active by simply typing the following url

http://localhost:8161/admin

anyone can further change the activemq configuration by changing the broker configuration URI, activemq default configuration and other thing.

Now configure the ROR projects for using the activemq

In our scrumpad all things are there what we have to do is to change the adapter of broker yml.

Change the adapter to rest

development:

adapter: rest

port: 8161

host: localhost


rest adapter is in the plug in at this moment. Download the rest.rb from http://people.apache.org/~dennisbyrne/a13g/rest.rb

and copy that file to

vendor/plugins/activemessaging/lib/activemessaging/adapters/




In my next post I will show how can we use STOMP in place of REST adapter

1 comment:

Jitu said...

Nice reference post