lib/right_amqp/amqp/client.rb in right_amqp-0.8.5 vs lib/right_amqp/amqp/client.rb in right_amqp-0.8.6
- old
+ new
@@ -24,11 +24,14 @@
{:LOGIN => @settings[:user],
:PASSWORD => @settings[:pass]},
'en_US')
when Protocol::Connection::Tune
+ # Use frame_max received from broker so that adapt properly to RabbitMQ 2.4.1
+ # expecting 131,072 and RabbitMQ 3.4.1 that is configured to 0 meaning unlimited
+ # because it will otherwise reject requests larger than this and fail the connection
send Protocol::Connection::TuneOk.new(:channel_max => 0,
- :frame_max => 131072,
+ :frame_max => method.frame_max,
:heartbeat => @settings[:heartbeat] || 0)
send Protocol::Connection::Open.new(:virtual_host => @settings[:vhost],
:capabilities => '',
:insist => @settings[:insist])