qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mARK bLOORE <mblo...@gmail.com>
Subject Re: correct way to connect and close in python?
Date Thu, 01 Oct 2009 21:18:44 GMT
Thanks for the reply, Rafael.

On Thu, Oct 1, 2009 at 2:10 PM, Rafael Schloming <rafaels@redhat.com> wrote:
> mARK bLOORE wrote:
...
>>    client = Client(host, port, qpid.spec.load(amqp_spec), vhost='/test')
>>    client.start({"LOGIN": 'guest', "PASSWORD": 'guest'})
>
> I recommend dropping the spec argument, it should be found automatically.

Without it I have to set the AMQP_SPEC environment variable, so it
isn't really avoidable.

...
>
> Try doing this before doing client.close():
>
> client.channel(0).connection_close(reply_code=200)

That did the trick!  Thank you.


> FYI, the code you're using is quite old and fairly undocumented/unsupported
> at this point. If you can you should consider using one of the newer python
> clients. At the moment that would require switching to the C++ broker since
> they're all based on the 0-10 protocol, however the Java broker will have
> 0-10 support soon if Java is a requirement for you on the server side.

Do you mean non-Qpid Python clients?  The only Qpid one I see is the
0.5 which I am using.  The only reason I've been using the 0.8 spec is
that I started with RabbitMQ, which is 0.8 only, and py-amqplib, which
is also 0.8 only.  But I couldn't get amqplib to connect to the Java
broker, so I switched to qpid-python.  I am not wedded to Java, so I
am happy to try the C++ broker, but I don't know of another Python
client for the 0.10 spec.


>
> --Rafael

-- 
mARK bLOORE <mbloore@gmail.com>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message