lib/freddy/message_handler.rb in freddy-jruby-0.4.3 vs lib/freddy/message_handler.rb in freddy-jruby-0.4.9
- old
+ new
@@ -1,19 +1,19 @@
class Freddy
class MessageHandler
- attr_reader :destination, :correlation_id
+ attr_reader :correlation_id
def initialize(adapter, delivery)
@adapter = adapter
- @metadata = delivery.metadata
- @correlation_id = @metadata.correlation_id
+ @delivery = delivery
+ @correlation_id = @delivery.correlation_id
end
def success(response = nil)
- @adapter.success(@metadata.reply_to, response)
+ @adapter.success(@delivery.reply_to, response)
end
def error(error = {error: "Couldn't process message"})
- @adapter.error(@metadata.reply_to, error)
+ @adapter.error(@delivery.reply_to, error)
end
end
end