On Fri, Oct 09, 2009 at 03:59:35PM +0200, Esteve Fernandez wrote: > Hi > > On Fri, Oct 9, 2009 at 10:32 AM, <launch...@subscribed.udmvt.ru> 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 there was also something about sending the client a message with the error description, just before the connection is dropped by the server. It is not obvious, how would such messages be routed to one's application via txamqp. I feel, that the code is simply missing. Tell me I was wrong, please!
> 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: I have never seen that, when experimented! Are you sure? I just going to try it all again now with some hope! > > 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 Yes, thrift looks good! > > Cheers. -- с уважением, Алексей Шпагин системный администратор цеха передачи данных технического центра телекоммуникаций ОАО "ВолгаТелеком" филиал в Удмуртской республике. _______________________________________________ Mailing list: https://launchpad.net/~txamqp-user Post to : txamqp-user@lists.launchpad.net Unsubscribe : https://launchpad.net/~txamqp-user More help : https://help.launchpad.net/ListHelp