[rabbitmq-discuss] rabbitutil.js - rabbitmqctl sibling in JavaScript w/ RabbitMQ Java & Mozi
derek.p.moore at gmail.com
derek.p.moore at gmail.com
Sat Sep 4 02:11:09 BST 2010
Hi, Alexis,
I have been using the script at work to white-box test Python click
processing servers (over @ my gracious employer Adknowledge). We use
RabbitMQ to separate & stage events between the incoming
(request/response), staging (persistence/replay), & handling
(validation/processing/storage) steps of various event handling processes.
I have used JavaScript to do useful things with jars in telecom before (CTI
& IVR)... And it suits itself quite well to application OLTP systems it
seems... But in my haste & pride to post the script I left a few functions
dangling, so here it is again for those interested:
http://github.com/derekm/rabbitutil
I slipped in the new RabbitMQ Java jars only to find they're 0-9-1-only. It
would be nice if the new libs were dual-mode, since 2.0 upgrades will be
phased in slowly by most organizations using these technologies.
I've expected similar queueing & messaging behaviors from systems like
Alcatel/Lucent's Genesys platform and barely received it... Having only
recently been introduced to these technologies, I have to say I like
RabbitMQ & Qpid over that other stuff any day! I'm not sure yet if AMQP is
the wire protocol to solve all wire protocols, but it's a step on the way
there. (I used to prefer the wire protocol: "<<" followed by two characters
of choice "CC" followed by 4-byte encoded 64-bit length of string followed
by preferred interchange format. But with RabbitMQ I hope I never write
another wire protocol again.)
I use my rabbitutil script's inject_msg, inject_msgs, & remove_msg daily,
but I did setup my environment using its other commands. I like Rabbit's
Java API over other ampq libs of various languages. The ease of working
with it is illustrated by this script, I think. I haven't thought of much
else to add to this basic set of commands, except to improve the commands
themselves (arguments & options, etc.). But if people have ideas I'd be
happy to work with them.
I'd do what I can help see functionality like this distributed with some
component of RabbitMQ. rabbitmqctl is very useful. Would this kind of
functionality have to be integrated into that command to ship?
Thanks!
Derek
On Sep 2, 2010 6:17am, Alexis Richardson <alexis at rabbitmq.com> wrote:
> Derek,
> How are you getting on with this? Has it proved useful or have you found
> that you need more functionality than you expected?
> alexis
> On Thu, Aug 19, 2010 at 4:46 AM, Derek Moore derek.p.moore at gmail.com>
> wrote:
> I wrote this today at work. Others may find it useful also.
> I wanted what rabbitmqctl seemed to lack, so I wrote this up quick &
> dirty. It is very simple, no validation, but functional. I also needed
> something to inject messages for testing purposes.
> I run the JavaScript from a shell script called "rabbitutil":
> --
> #!/bin/bash
> java -cp js.jar:commons-io-1.2.jar:rabbitmq-client.jar \
> org.mozilla.javascript.tools.shell.Main rabbitutil.js $@
> --
> and/or jrunscript (which I haven't really tested):
> jrunscript -cp commons-io-1.2.jar:rabbitmq-client.jar rabbitutil.js
> Source attached as "rabbitutil.txt", since .js is commonly filtered.
> Cheers,
> <> div>Derek P. Moore
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20100904/7d48c1a1/attachment.htm>
More information about the rabbitmq-discuss
mailing list