[rabbitmq-discuss] Rabbit RPC Application

Simon MacMullen simon at rabbitmq.com
Tue Dec 6 15:57:28 GMT 2011


Hi Bruno.

It probably depends how frequently you expect to publish messages - 
while the comparative overhead of setting up a channel with JSON-RPC is 
lower than with AMQP (just because everything gets translated into 
comparatively expensive HTTP requests anyway), it's still there.

I suspect it won't make a huge difference though.

Cheers, Simon

On 01/12/11 17:03, Bruno Carneiro wrote:
> Hello Everybody,
>
> I developed a monitoring application using Rabbit and Rabbit RPC plugin.
> I'm monitoring events on my HTML pages and sending messages over HTTP.
> What my javascript does is for each event, it opens a channel, send a
> message and close that channel. This is the snippet:
>
>         function on_open(channel) {
>
>         channel.queueDeclare(exchangeQueue, false, true, false, false)
>
>             .addCallback( function() {
>
>         channel.basicPublish("", exchangeQueue, exchangeMessage, props);
>
>         channel.close();
>
>         });
>
>         }
>
>
>         function trackEvent(queue, jsonMsg){
>
>         channel = RabbitMQ.openChannel(on_open, {'exchangeQueue': queue,
>         'exchangeMessage': jsonMsg});
>
>         }
>
>
>
> When I saw the examples I was wondering what is the best practice using
> channel in a browser?
> Should I open and close it for each message or should I leave it open
> and send messages through this channel?
>
> Thank you!
>
> Cheers,
>
> Bruno Carneiro
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list