[rabbitmq-discuss] python stomp examples
Jason Briggs
jasonrbriggs at gmail.com
Thu Sep 11 09:58:19 BST 2008
Hi All
Rather late to the party, but I thought I'd let you know I've found
out what the problem was with stomp.py. Two problems actually:
1. the user/passcode headers weren't being issued with the connect
(dumb omission on my part)
2. the stomp protocol is a bit ambiguous about the use of spacing
between header key and value. For example:
header: value
header:value
Both forms are used in the stomp protocol examples. My version of the
client used a space -- it appears RabbitMQ doesn't like it. I've
removed the space, and along with the prior fix it appears to work
properly now (the latest version is on my site).
Just for your info.
Kind regards
Jason
> Hi again,
> I gave up on stomp.py and instead decided to give stomper a try:
> http://code.google.com/p/stomper/
>
> this 'just worked' and I could see the messages also propagating to
> the bundled ruby listener that ships with the stomp adapter for
> rabbitmq.
> I did however notice something that seemed odd. The example
twisted
> python stomper client functions as both a sender and a listener, and
> sends out periodic messages to a pre-specified destination. When I
> had the ruby listener subscribed to the same channel, 'carl', I
> noticed that one message would go to the ruby listener, and the next
> would be received by the python listener.
> If both are subscribed to the 'carl' channel, my intuition tells me
> that both should be able to hear each and every message.
> Why does this not seem to actually be the case? (sorry if this
is a
> really naive question)
> Is there some additional header I need to send in order to
broadcast
> messages, or is broadcasting a horse of a different color?
>
> Cheers,
> Joe
>
> 2008/9/9 Ben Hood <0x6e6562 at gmail.com>:
>> Joe,
>>
>> On Mon, Sep 8, 2008 at 4:26 PM, Novak Joe <joes.mailing.lists at
gmail.com> wrote:
>>
>>>> BTW, is your goal to speak to Rabbit from Python fullstop, or do
you
>>>> specifically need to use STOMP?
>>> I specifically need to use STOMP, and I want to integrate this with
>>> Orbited ( www.orbited.org ), and an existing pylons application.
>>
>> Sure. BTW, have you read this article:
>> http://orbited.org/blog/2008/09/integrating-orbited-with-web-app-frameworks/
>>
>>> The stomp.py test program I'm using, which comes directly from the
>>> site mentioned in my original post, is still giving the following
>>> error:
>>> ERROR
>>> message: Bad CONNECT
>>> content-length: 36
>>>
>>> Missing login or passcode header(s)
>>>
>>> despite my most certainly sending the headers. But I suspect
there is
>>> some descrepancy between this and the ruby examples that ship
with the
>>> stomp adapter source, so maybe a bit of digging around will be
>>> sufficient for me to solve this!
>>
>> Maybe Jason (cc'ed) can help debug this?
>>
>> Ben
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20080911/fbab92f8/attachment.htm
More information about the rabbitmq-discuss
mailing list