Here is the traceback showing the exception as thrown by amqplib, with
the channel exception code:
ch.queue_declare('bdirect', arguments={"x-expires": 600})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.6/amqplib/client_0_8/",
line 1294, in queue_declare
(50, 11), # Channel.queue_declare_ok
File "/usr/lib/pymodules/python2.6/amqplib/client_0_8/",
line 105, in wait
return amqp_method(self, args)
File "/usr/lib/pymodules/python2.6/amqplib/client_0_8/",
line 273, in _close
(class_id, method_id))
amqplib.client_0_8.exceptions.AMQPChannelException: (406,
u"PRECONDITION_FAILED - invalid arg 'x-expires' for queue 'bdirect' in
vhost '/': expires_not_of_type_long", (50, 10),

In the library code, it looks like it properly packs the integer, but
0-8 doesn't support the desired integer type:


372 elif isinstance(v, (int, long)):
373 table_data.write('I')
374 table_data.write(pack('>i', v))

The problem might actually lie in the server side parser code:


99 parse_field_value(<<"l", Value:64/signed, Rest/binary>>) ->
100 {long, Value, Rest};

The 0-8 specification doesn't define a long type outside of the "I"
type, so this excludes this feature (which is a *great* feature) from
older clients.

You should probably just have x-expires look for a regular 0-8
supported, 4-byte "I"-type integer. It will limit queue time expiry
maximum to 68 years, but one has to make design tradeoffs every once
and awhile ;).

Good work on the 2.0 release. Its looking fantastic thus far.


Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
grouprabbitmq-discuss @
postedAug 29, '10 at 8:50a
activeAug 30, '10 at 7:41p

2 users in discussion

Stephen Day: 4 posts Matthias Radestock: 1 post



site design / logo © 2022 Grokbase