← Back to team overview

txamqp-user team mailing list archive

Re: few general questions

 

Hi

On Fri, Oct 9, 2009 at 10:32 AM,  <launchpad@xxxxxxxxxxxxxxxxxxx> wrote:
>> uhm, never tried sorry
> It looks like txAMQP lacks some error detection features and when something
> erroneous happens, your program get stuck, since on error no callback is called,
> but also no errback. :(

There's a question in the Answers section of the Launchpad page, which
is fairly similar:

https://answers.launchpad.net/txamqp/+question/84002

The standard states that in case of any error, the connection will be
closed. But, in any case, errbacks are actually called if an error
happens (it just happens to be a Closed exception), e.g using the
inlineCallbacks idiom:

yield channel.exchange_declare(exchange=name, type=type,
durable=durable, auto_delete=auto_delete)
try:
        yield channel.exchange_declare(exchange=name, type=type,
durable=durable, auto_delete=auto_delete)
except Closed, mess: # You can't redeclare an exchange
        print 'E1: %s' % mess

> It is still possible to use twisted with pyamqplib (as with any other syncronous
> library) by moving all blocking calls out of reactor thread.
> It is often preferable to put it into separate process (security & perfomance),
> that will serve some RPC-like service, you may ever implement it in twisted.
> But, as you can see, some effort is required.

BTW, if you want to do RPC over txAMQP, you may want to have a look at
Thrift and the examples in src/examples/thrift

Cheers.



Follow ups

References