lib/fluffle/server.rb in fluffle-0.0.1 vs lib/fluffle/server.rb in fluffle-0.0.2
- old
+ new
@@ -31,18 +31,18 @@
raise ArgumentError, 'Cannot provide both handler: and block'
end
handler = Fluffle::Handlers::Dispatcher.new(&block) if block
- @handlers[queue_name.to_s] = handler
+ @handlers[queue.to_s] = handler
end
def start
@channel = @connection.create_channel
@exchange = @channel.default_exchange
@handlers.each do |name, handler|
- qualified_name = Fluffle.response_queue_name name
+ qualified_name = Fluffle.request_queue_name name
queue = @channel.queue qualified_name
queue.subscribe do |delivery_info, properties, payload|
self.handle_request queue_name: name,
handler: handler,