Thursday, March 8, 2012

How to Setup RabbitMQ Message Broker with Kaazing WebSocket Gateway - AMQP Edition

If you want to try the Kaazing WebSocket Gateway - AMQP Edition with RabbitMQ, take a look on the following steps...

If you are trying this setup on a Mac, make sure you have Erlang already installed otherwise have a look on my previous post on How to Install Erlang on Mac OS X Snow Leopard.

Install RabbitMQ


- Download RabbitMQ from http://www.rabbitmq.com/download.html

- Extract the file to the desired directory

- Navigate to RabbitMQ installation directory and run the following command:

$ sbin/rabbitmq-server

If RabbitMQ is started correctly you should see a message similar to the following:

Activating RabbitMQ plugins ...

********************************************************************************
********************************************************************************

0 plugins activated:


+---+   +---+
|   |   |   |
|   |   |   |
|   |   |   |
|   +---+   +-------+
|                   |
| RabbitMQ  +---+   |
|           |   |   |
|   v2.7.1  +---+   |
|                   |
+-------------------+
AMQP 0-9-1 / 0-9 / 0-8
Copyright (C) 2007-2011 VMware, Inc.
Licensed under the MPL.  See http://www.rabbitmq.com/

node           : rabbit@yoda
app descriptor : /Applications/Kaazing/kaazing-websocket-gateway-amqp-3.2.0/rabbitmq_server-2.7.1/sbin/../ebin/rabbit.app
home dir       : /Users/Marcelo
config file(s) : (none)
cookie hash    : AYkkciNJ6lsr2dyADBN8ww==
log            : /Applications/Kaazing/kaazing-websocket-gateway-amqp-3.2.0/rabbitmq_server-2.7.1/work/rabbitmq/rabbit@yoda.log
sasl log       : /Applications/Kaazing/kaazing-websocket-gateway-amqp-3.2.0/rabbitmq_server-2.7.1/work/rabbitmq/rabbit@yoda-sasl.log
database dir   : /Applications/Kaazing/kaazing-websocket-gateway-amqp-3.2.0/rabbitmq_server-2.7.1/work/rabbitmq/mnesia/rabbit@yoda
erlang version : 5.9

-- rabbit boot start
starting file handle cache server                     ...done
starting worker pool                                  ...done
starting database                                     ...done
starting codec correctness check                      ...done
-- external infrastructure ready
starting plugin registry                              ...done
starting auth mechanism cr-demo                       ...done
starting auth mechanism amqplain                      ...done
starting auth mechanism plain                         ...done
starting statistics event manage                      ...done
starting logging server                               ...done
starting exchange type direct                         ...done
starting exchange type fanout                         ...done
starting exchange type headers                        ...done
starting exchange type topic                          ...done
-- kernel ready
starting alarm handler                                ...done
starting node monitor                                 ...done
starting cluster delegate                             ...done
starting guid generator                               ...done
starting memory monitor                               ...done
-- core initialized
starting empty DB check                               ...done
starting exchange, queue and binding recovery         ...done
starting mirror queue slave sup                       ...done
starting adding mirrors to queues                     ...done
-- message delivery logic ready
starting error log relay                              ...done
starting networking                                   ...done
starting direct_client                                ...done
starting notify cluster nodes                         ...done

broker running 


Install and Run Kaazing WebSocket Gateway - AMQP Edition

- Download and install Kaazing WebSocket Gateway - AMQP Edition

- Navigate to the Kaazing WebSocket Gateway installation directory and start it using the following command:

$ bin/gateway.start

Open your web browser of choice and navigate to http://localhost:8001 then select DEMOS on top menu.

At this point, you should be able to run any of the demos available using RabbitMQ as the backend messaging system.

Setting Up Local Environment for Developing Oracle Intelligent Bots Custom Components

Oh the joy of having a local development environment is priceless. For most cloud based solutions the story repeats itself being hard to tr...