I traced the whole conversation between my script and rabbit, and from what I see it all runs sequentially. I also did the same thing with amqplib - both libraries send the same methods and the same arguments, in the same sequence. Only the result differs - it works in amqplib while crashes in txamqp.
Here is a printout of what is being sent and received: <=== (10, 10) [0] Method(name=start, id=10) 8, 0, {'information': 'Licensed under the MPL. See http://www.rabbitmq.com/', 'product': 'RabbitMQ', 'version': '2.2.0', 'copyright': 'Copyright (C) 2007-2010 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.', 'platform': 'Erlang/OTP'}, PLAIN AMQPLAIN, en_US ---> (10, 11) [0] Method(name=start-ok, id=11) {}, AMQPLAIN, {'LOGIN': 'guest', 'PASSWORD': 'guest'}, en_US <=== (10, 30) [0] Method(name=tune, id=30) 0, 131072, 0 ---> (10, 31) [0] Method(name=tune-ok, id=31) 0, 131072, 0 ---> (10, 40) [0] Method(name=open, id=40) /, , False <=== (10, 41) [0] Method(name=open-ok, id=41) ---> (20, 10) [1] Method(name=open, id=10) <=== (20, 11) [1] Method(name=open-ok, id=11) ---> (40, 10) [1] Method(name=declare, id=10) 0, base.broadcast, fanout, False, False, False, False, False, {} <=== (40, 11) [1] Method(name=declare-ok, id=11) ---> (50, 10) [1] Method(name=declare, id=10) 0, base_broadcast_listen_123, False, False, False, False, False, {} <=== (50, 11) [1] Method(name=declare-ok, id=11) base_broadcast_listen_123, 0, 0 ---> (50, 20) [1] Method(name=bind, id=20) 0, base_broadcast_listen_123, base.broadcast, , False, {} <=== (50, 21) [1] Method(name=bind-ok, id=21) ---> (60, 20) [1] Method(name=consume, id=20) 0, base_broadcast_listen_123, , False, True, False, False, {} at this point channel in rabbit crashes. Same thing (with slight differences in queue parameters, does it matter?) in amqplib looks like this: <=== (10, 10) 8 0 {u'information': 'Licensed under the MPL. See http://www.rabbitmq.com/', u'product': 'RabbitMQ', u'version': '2.2.0', u'copyright': 'Copyright (C) 2007-2010 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.', u'platform': 'Erlang/OTP'} ['PLAIN', 'AMQPLAIN'] ['en_US'] ---> (10, 11) {'library': 'Python amqplib', 'library_version': '0.6.1'} AMQPLAIN LOGINSguesPASSWORDSguest en_US <=== (10, 30) 65535 131072 0 ---> (10, 31) 65535 131072 0 ---> (10, 40) / False <=== (10, 41) ---> (20, 10) <=== (20, 11) ---> (40, 10) 0 broadcast fanout False True False False False {} <=== (40, 11) ---> (50, 10) 0 messages False True False True False {} <=== (50, 11) messages 0 0 ---> (50, 20) 0 messages broadcast test.messages False {} <=== (50, 21) ---> (60, 20) 0 messages False True False False <=== (60, 21) here we get the (60, 21) response, so rabbit works properly... Bartek Górny On Mon, 29 Aug 2011 10:58:34 +0200 bartek <bar...@gorny.edu.pl> wrote: > On Fri, 26 Aug 2011 18:42:13 +0200 > Esteve Fernandez <esteve.fernan...@gmail.com> wrote: > > > Hey, > > > > 2011/8/26 bartek <bar...@gorny.edu.pl>: > > > blocks, the channel disappears from rabbitmq, and rabbit's sasl > > > log shows a crash report, the most important line being: > > > > > > exception exit: {amqp_error,frame_error, > > > "cannot decode > > > > > > <<0,0,16,98,114,111,97,100,99,97,115,116,95,108,105,115,116,101,110,0,0,0,0,0,0>>", > > > 'basic.consume'} > > > > This usually happens when there's a Deferred that's not yield > > elsewhere in the code. The way AMQP works is that all commands must > > be sent in order, that is, you can't send a command if you haven't > > waited for the previous one to come back (if it produces a > > response). > > Ah, so in other words rabbit's channel is in the wrong state so it > does not accept the command I send? > > > > > Is this the only place where you're using AMQP? Is there anywhere > > else in the code where it's used? > > Not really - the code is trivial, mostly copied from the test suite. > Maybe I'm running it in the wrong way? See attached - all I do is > start and listen... > > B. > > > > > > Thanks for using txAMQP! > > > > _______________________________________________ > > 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 > > > -- Powiedziałem mu że moja znajomość z owcami pozwoliła mi świetnie zrozumieć antypatie rasowe i z tego względu nie mogę nic w tej sprawie zrobić. (gen. George S. Patton, "Wojna - jak ją poznałem") _______________________________________________ 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