lib/cotton_tail/queue/bunny.rb in cotton-tail-0.3.0 vs lib/cotton_tail/queue/bunny.rb in cotton-tail-0.4.0

- old
+ new

@@ -22,18 +22,16 @@ @connection = connection watch_source manual_ack end - def push(args) - routing_key, message = args - bind routing_key - exchange.publish message, routing_key: routing_key + def push(request) + bind request.routing_key + exchange.publish request.payload, routing_key: request.routing_key end def pop - delivery_info, *tail = super - [delivery_info[:routing_key], delivery_info, *tail] + Request.new(*super) end def bind(routing_key) source.bind('amq.topic', routing_key: routing_key) end