lib/message_driver/client.rb in message-driver-0.2.0.rc2 vs lib/message_driver/client.rb in message-driver-0.2.0

- old
+ new

@@ -14,11 +14,15 @@ dest = find_destination(destination) current_adapter_context.pop_message(dest, options) end def subscribe(destination_name, consumer_name, options={}) - destination = find_destination(destination_name) consumer = find_consumer(consumer_name) + subscribe_with(destination_name, options, &consumer) + end + + def subscribe_with(destination_name, options={}, &consumer) + destination = find_destination(destination_name) current_adapter_context.subscribe(destination, options, &consumer) end def dynamic_destination(dest_name, dest_options={}, message_props={}) current_adapter_context.create_destination(dest_name, dest_options, message_props)