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

- 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

node           : rabbit@yoda
app descriptor : /Applications/Kaazing/kaazing-websocket-gateway-amqp-3.2.0/rabbitmq_server-2.7.1/sbin/../ebin/
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.

Monday, March 5, 2012

Installing Erlang on Mac OS X Snow Leopard

I'm working with a customer who is using the Kaazing WebSocket Gateway - AMQP Edition with RabbitMQ and while his install was pretty straightforward on Windows 7 I thought the same would be applicable to my case (a Mac user). Well, to summarize the process, it was quite of a challenge to get everything working, not from the complexity perspective but for the number of steps involved in the process to get the environment running starting from the point that RabbitMQ depends on Erlang to run. So, that was the first step... Installing Erlang on Mac OS X

Here are the steps I had to take:

- Download and install Apple Xcode 4.3 from Apple's AppStore (yeah, you read it right!)

- The tricky part here was to enable Command Line Tools which is not selected by default in Xcode. To do that, go to Xcode Preferences --> Downloads --> Components and install Command Line Tools. It's just another 170MB over the already downloaded 1.35GB of Xcode :)

- Download Erlang latest release from

- Extract the Erlang package (i.e. tar -xvf otp_src_R15B.tar) and navigate into the recently created directory

- Run ./configure

- Run ./make

- Run sudo make install

Hope this help you to get your project going...

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...