MarchHare.connect now accepts :heartbeat as an alias for :heartbeat_requested
for better Bunny compatibility (and because API reference accidentally listed it).
GH issue: #57.
Full Change Log
Please consult the change log
to learn about the changes.
MarchHare::Exchange#publish now accepts property options the same way
as Bunny does (the old way with the :properties
option is still supported). This improves March Hare and Bunny API compatibility.
The new way:
123456789101112131415161718192021222324252627
exchange.publish(payload,:app_id=>"hotbunnies.tests",:persistent=>true,:priority=>8,:type=>"kinda.checkin",# headers table keys can be anything:headers=>{"coordinates"=>{"latitude"=>59.35,"longitude"=>18.066667},"time"=>@now,"participants"=>11,"venue"=>"Stockholm","true_field"=>true,"false_field"=>false,"nil_field"=>nil,"ary_field"=>["one",2.0,3,[{"abc"=>123}]]},:timestamp=>@now,:reply_to=>"a.sender",:correlation_id=>"r-1",:message_id=>"m-1",:content_type=>"application/octet-stream",# just an example. MK.:content_encoding=>"zip/zap",:routing_key=>"hotbunnies.key")
The old way:
1234567891011121314151617181920212223242526272829
exchange.publish(payload,:properties=>{:app_id=>"hotbunnies.tests",:persistent=>true,:priority=>8,:type=>"kinda.checkin",# headers table keys can be anything:headers=>{"coordinates"=>{"latitude"=>59.35,"longitude"=>18.066667},"time"=>@now,"participants"=>11,"venue"=>"Stockholm","true_field"=>true,"false_field"=>false,"nil_field"=>nil,"ary_field"=>["one",2.0,3,[{"abc"=>123}]]},:timestamp=>@now,:reply_to=>"a.sender",:correlation_id=>"r-1",:message_id=>"m-1",:content_type=>"application/octet-stream",# just an example. MK.:content_encoding=>"zip/zap"},:routing_key=>"hotbunnies.key")
Contributed by Devin Christensen.
Full Change Log
Please consult the change log
to learn about the changes.
TLS now can be explicitly disabled even when connecting (without TLS)
to the default RabbitMQ TLS/amqps port (5671):
1
conn=Bunny.new(:port=>5671,:tls=>false)
Contributed by Muhan Zou.
Single Threaded Connections Raise Shutdown Exceptions
Single threaded Bunny connections will now raise exceptions
that occur during shutdown as is (instead of trying to shut down
I/O loop which only threaded ones have).
Contributed by Carl Hörberg.
Synchronization Improvements for Session#close
Bunny::Session#close now better synchronizes state transitions,
eliminating a few race condition scenarios with I/O reader thread.
Bunny::Exchange.default Fix
Bunny::Exchange.default no longer raises an exception.
Note that it is a legacy compatibility method. Please use
Bunny::Channel#default_exchange instead.
Bunny::Queue#pop_as_hash, which was added to ease migration
to Bunny 0.9, was removed.
Bunny::Queue#pop Wraps Metadata
Bunny::Queue#pop now wraps basic.get-ok and message properties
into Bunny::GetResponse and Bunny::MessageProperties, just like
basic.consume deliveries.
Publisher confirms implementation now synchronizes unconfirmed
set better.
Contributed by Nicolas Viennot.
Channel Allocation After Recovery
Channel id allocator is no longer reset after recovery
if there are channels open. Makes it possible to open channels
on a recovered connection (in addition to the channels
it already had).