On 02/14/2013 10:42 AM, Steven Hardy wrote:
On Wed, Feb 13, 2013 at 05:38:46PM +0000, Gordon Sim wrote:
On 02/13/2013 08:49 AM, Steven Hardy wrote:
Hi,

I'm trying to understand some differences encoding map datatypes between
qpid and rabbitmq (openstack project which needs to support both)

It seems that we hit a limit of 2^16 bytes when encoding a map on qpid,
because the map appears to be encoded as a string (write_map in codec010.py)

Looking at the amqp 0-10 spec, it says "An encoded map may contain up to
(4294967295 - 4) octets worth of encoded entries.", so I'm trying to
understand the 65535 byte limitation I'm hitting, since we do not appear to
hit the same problem when configured to use rabbit.

Can anyone please advise - is this a bug in python-qpid, or an expected
limitation of the qpid implementation?

I think that is a bug in python-qpid. Do you have a simple
reproducer you could attach to a JIRA?

I've created a minimal reproducer - after looking a bit more closely, the
limitation is that no element of the dict/map can exceed 2^16 characters, or
the str16 encoding fails, so the limit is not based on total map size.

I wondered if that might be the issue. A str16 does have a 2^16 limit. There is a vbin32 type in 0-10 however that could perhaps be used (though that is considered 'opaque binary data'.

I don't see anything in the spec specifying limits on individual map
elements, only the total size, and as I mentioned before, this does work
fine with rabbitmq, so I'll raise a JIRA issue.

Reproduce procedure:

git clone https://gist.github.com/hardys/4951857
cd 4951857
python reproducer.py

Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to