barryp / py-amqplib

Python client for the Advanced Message Queuing Procotol (AMQP)
GNU Lesser General Public License v2.1
24 stars 10 forks source link

Remove hardcoded max framesize #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of amqplib are you using?
0.6.1

Have you checked to see if there is a newer version in the "Featured
Downloads" section of the front page of this project?
yes

Which broker are you using (RabbitMQ?) which version?
RabbitMQ 1.7.1

Which version of Python?
2.6.2

What steps will reproduce the problem?
1. Open connection
2. Attempt to write large message (e.g. 22MB)

What is the expected output? What do you see instead?
Instead of sending the message, the connection is forcibly closed.

Please provide any additional information below.
http://hg.barryp.org/py-amqplib-
devel/file/9f9c3e41559c/amqplib/client_0_8/connection.py#l115 (and earlier 
versions) have a hardcoded maximum framesize of 131072 bytes. 

Suggest using kwargs on Connection() method to override frame_max as 
required.

Original issue reported on code.google.com by sigurd.h...@gtempaccount.com on 8 Feb 2010 at 6:44

GoogleCodeExporter commented 9 years ago
I now believe this is not the cause of my problems; RabbitMQ currently enforces 
128K 
max framesize. See issue #14.

Original comment by sigurd.h...@gtempaccount.com on 9 Feb 2010 at 5:57

GoogleCodeExporter commented 9 years ago
frame_max isn't entirely hard coded, the server can negotiate a lower value 
than what we propose as 128K, although the spec says it must be at least 4K.  

There's nothing magical about our upper limit of 128K, it could be set higher - 
but that doesn't stop you from sending larger messages.  Before Revision 
0942c3b23048     though, a 22MB message may have taken way longer than you would 
have liked.

Original comment by barry.pe...@gmail.com on 28 Mar 2011 at 5:41