qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Understanding python-qpid map size limitations
Date Wed, 13 Feb 2013 17:38:46 GMT
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?

> The versions I'm using are Fedora packages:
> qpid-cpp-client-0.20-2.fc17.x86_64
> python-qpid-0.20-1.fc17.noarch
> qpid-cpp-server-0.20-2.fc17.x86_64
>
> Here's an example backtrace of the error-path I'm hitting:
>    File "/usr/lib/python2.7/site-packages/qpid/messaging/driver.py", line
> 1248, in send
>      body = enc(msg.content)
>    File "/usr/lib/python2.7/site-packages/qpid/messaging/message.py", line
> 28, in encode
>      sc.write_primitive(type, x)
>    File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 73, in
> write_primitive
>      getattr(self, "write_%s" % type.NAME)(v)
>    File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 257, in
> write_map
>      sc.write(string.joinfields(map(self._write_map_elem, m.keys(),
> m.values()), ""))
>    File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 250, in
> _write_map_elem
>      sc.write_primitive(type, v)
>    File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 73, in
> write_primitive
>      getattr(self, "write_%s" % type.NAME)(v)
>    File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 190, in
> write_str16
>      self.write_vbin16(s.encode("utf8"))
>    File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 203, in
> write_vbin16
>      self.write_uint16(len(b))
>    File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 116, in
> write_uint16
>      raise CodecException("Cannot encode %d as uint16" % n)
> CodecException: Cannot encode 69525 as uint16
>
> Any help understanding this would be much appreciated! :)
>
> Steve Hardy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message