[rabbitmq-discuss] Flash Client and RabbitMQ

Michael Bridgen mikeb at rabbitmq.com
Thu Feb 2 13:26:53 GMT 2012


On 02/02/2012 12:13 PM, Marek Majkowski wrote:
> On Thu, Feb 2, 2012 at 10:58, Jon Hill<jon.hill at comshen.com>  wrote:
>> I am involved in the development of an online game using Flash as the
>> client. We are considering communicating directly with a RabbitMQ
>> broker from Flash but are wondering if this is the best approach.
>> Should we be considering using WebSockets (and therefore tunneling
>> through http with a gateway such as Kaazing in place) because of the
>> potential of raw AMQP traffic getting blocked by firewalls?

I am interested to know if you really need to extend AMQP to the clients 
-- could something simpler work? AMQP is quite complicated and gives 
over a lot of control to clients. If you just need to send and receive 
messages at clients it's a lot of trouble to go to.

> Using Kaazing is definitely one option.
>
> The alternative is to build a simple server that would forward
> WebSockets to AMQP. Things like in Node.js or Python/Tornado
> should do.
>
> If you want to use the stream from javascript in browser,
> you can take a look at SockJS: http://sockjs.org , which
> not only serves native WebSockets but also uses convenient
> fallbacks if browser doesn't support websockets or if browser
> is behind a corporate proxy.
>
> At the moment we're experimenting with the RabbitMQ to
> SockJS bridge as a RabbitMQ plugin. But it's hard to
> predict when this will be done.

It's pretty easy to write an adapter of your own, if you are prepared to 
run it somewhere. Just pick an AMQP client and a websocket library -- 
SockJS is a fine choice even if you don't need the fallback transports 
right now.

Or (here comes the plug) use rabbit.js, which makes it dead simple, at 
the cost of papering over AMQP "features": 
https://github.com/squaremo/rabbit.js


-Michael


More information about the rabbitmq-discuss mailing list