lib/message_driver/destination.rb in message-driver-0.1.0 vs lib/message_driver/destination.rb in message-driver-0.2.0.rc1

- old
+ new

@@ -6,26 +6,29 @@ def initialize(adapter, name, dest_options, message_props) @adapter = adapter @name = name @dest_options = dest_options @message_props = message_props - after_initialize end def publish(body, headers={}, properties={}) - @adapter.publish(@name, body, headers, @message_props.merge(properties)) + Client.publish(self, body, headers, properties) end def pop_message(options={}) - @adapter.pop_message(@name, options) + Client.pop_message(self, options) end - def after_initialize + def after_initialize(adapter_context) #does nothing, feel free to override as needed end def message_count raise "#message_count is not supported by #{self.class}" + end + + def subscribe(&consumer) + raise "#subscribe is not supported by #{self.class}" end end end end