lib/message_driver/destination.rb in message-driver-0.6.1 vs lib/message_driver/destination.rb in message-driver-0.7.0
- old
+ new
@@ -21,18 +21,18 @@
def after_initialize(_adapter_context)
# does nothing, feel free to override as needed
end
def message_count
- fail "#message_count is not supported by #{self.class}"
+ current_adapter_context.message_count(self)
end
- def subscribe(_options = {}, &_consumer)
- fail "#subscribe is not supported by #{self.class}"
+ def subscribe(options = {}, &consumer)
+ current_adapter_context.subscribe(self, options, &consumer)
end
def consumer_count
- fail "#consumer_count is not supported by #{self.class}"
+ current_adapter_context.consumer_count(self)
end
def middleware
@middleware ||= Middleware::MiddlewareStack.new(self)
end