[rabbitmq-discuss] RabbitMQ and Websockets

Miguel Morales therevoltingx at gmail.com
Thu Nov 4 19:07:06 GMT 2010


I'd be very interested in this.  I haven't looked too much into it, so
I don't know what existing solutions exist.  This is what I'd like
though:
I don't need for the browser to create any queues/exchanges/bindings
so those calls are not important to me.  This should be done server
side (at least to me.)
I'd like to use it in a very text/json oriented way.  Here's how I'd
like to publish a message:

var message = new Object();
message.command = "publish";
message.queue = "myqueue";
message.exchange = "myexchange";
message.key = "mybindkey";
message.body = "hello world";

var message_json = JSON.stringify(message);

var ws = new WebSocket("ws://4.2.2.2:123");
ws.send(message_json);

Consuming:

var subscribe = new Object();
subscribe.command = "consume";
subscribe.queue = ...

ws.send(subscribe_json);

//wait for reply from server...
ws.onopen = function(event)
{
  //handle message or error here..
}

I don't need STOMP support, the websocket plugin should just require a
port for communication and delegate the commands to rabbitmq.

On Thu, Nov 4, 2010 at 10:47 AM, Christian Legnitto
<clegnitto at mozilla.com> wrote:
>
> On Nov 4, 2010, at 10:26 AM, Marek Majkowski wrote:
>
>> On Fri, Oct 29, 2010 at 19:55, Christian Legnitto <clegnitto at mozilla.com> wrote:
>>> [...]
>>> Support for WebSockets
>>>
>>> * It'd be nice for there a plugin to support websockets
>>> * More important for Mozilla as most tools are web-based
>>> * I have set it up with orbitd, but it's a pain / another moving piece / easier to uncomment a line like http://activemq.apache.org/websockets.html
>>
>>
>> Christian,
>>
>> I'm interested in creating a websockets plugin for Rabbit.
>>
>> But I'm not really sure how you'd like to use it.
>>
>> As a thing exposed to the wild internet?
>> Or just as another framing for AMQP?
>> Or as a wire protocol for STOMP?
>> (like this thing http://jmesnil.net/stomp-websocket/doc/)
>>
>> Or maybe you have yet another use case?
>>
>> Cheers,
>>  Marek
>
> I was thinking more like http://jmesnil.net/stomp-websocket/doc/, as that's what I have been using. Of course, the more options the merrier :-) I can't really provide erlang help, but I'm sure I can poke the WebSocket guys here at Moz to provide any assistance required on that front.
>
> Thanks,
> Christian
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://developingthedream.blogspot.com/,
http://www.youtube.com/user/revoltingx


More information about the rabbitmq-discuss mailing list