[rabbitmq-discuss] python stomp examples

Ben Hood 0x6e6562 at gmail.com
Mon Sep 8 15:23:52 BST 2008


Joe,

On Mon, Sep 8, 2008 at 2:09 PM, Novak Joe <joes.mailing.lists at gmail.com> wrote:
> Hi,
>  I've just installed rabbitmq on debian etch.  I found it very simple
> to get the package installed, and set the server running, however I'd
> now like to put together a simple python-based test client, and use it
> to test basic communication with the rabbitmq server, over the stomp
> protocol.  I initially tried using the stompy module,
> http://www.briggs.net.nz/log/projects/stomppy/
> $ python stomp.py localhost 61613
> subscribe /queue/test
> send /queue/test hello world
>
>  albeit without making any changes to the default setup of the
> rabbitmq server, but had very mixed results.
>  In particular, the first time I tried the example given on the page
> above, the server returned a message regarding some gnu project, but
> subsequent attempts to send messages did not return any results.
>
>  Are there any lowbrow, python examples of how to actually use the
> server to send and receive messages?  I was unable to find any on the
> main website but I suspect I must have missed something obvious.  For
> example, do I need to install the rabbitmq-stomp gateway, in addition
> to the rabbitmq-server, before I can hope to accomplish anything?
> Maybe it will suffice for me to first read all of the various blog
> entries recommended for the stomp gateway.

Have you read Tony's article about how to install and run the STOMP
adapter (which is not bundled with the Rabbit package for Debian)?

http://www.lshift.net/blog/2008/04/30/stomp-adapter-updated-for-rabbitmq-130

IIRC, this also contains client examples in Ruby and Perl.

Also, if you would send in the error or ordinary response messages, it
would help other people diagnose the problem.

BTW, is your goal to speak to Rabbit from Python fullstop, or do you
specifically need to use STOMP?

If you are just interested in the former, you may just want to start
out with Barry's Python library for AMQP:
http://barryp.org/software/py-amqplib/

HTH,

Ben




More information about the rabbitmq-discuss mailing list