[rabbitmq-discuss] Channel Cost

Jason J. W. Williams jasonjwwilliams at gmail.com
Tue Jan 27 19:34:31 GMT 2009


Hi Barry,

chan_send.basic_publish(msg,exchange=args.exchange,routing_key=args.routing_key)
to an exchange that doesn't exist. I was just wrapping that in a
try/except, assuming it would raise AMQPChannelError if there was an
issue. Unfortunately, it doesn't look like basic_publish has any logic
for checking for an error.

At this point I'm looking at wrapping .wait() in a decorator that
registers an alarm signal and forces an exception if the alarm timer
is too long. Either that or I'll have to move to txAMQP to defer the
error check.

-J

On Tue, Jan 27, 2009 at 12:24 PM, Barry Pederson <bp at barryp.org> wrote:
> Jason J. W. Williams wrote:
>>
>> It looks like I can trigger the error by calling a channel.wait() to
>> pick up any errors that were triggered by the send. Problem is .wait()
>> is a blocking call and if everything went all right it just hangs up
>> the program. I'll take this over to the py-amqplib folks.
>
> How are you triggering errors with the send?  Is it with immediate or
> mandatory flags?  It'd be good to have an example that could be the basis
> for a unittest.
>
>        Barry
>




More information about the rabbitmq-discuss mailing list