diff --git a/lib/event_source/configure/mode.rb b/lib/event_source/configure/mode.rb index cbe438b..a3bbfdd 100644 --- a/lib/event_source/configure/mode.rb +++ b/lib/event_source/configure/mode.rb @@ -15,8 +15,8 @@ def normal? @value == :normal end - def web? - @value == :web + def publisher? + @value == :publisher end def self.normal @@ -26,7 +26,7 @@ def self.normal def self.parse(mode_string) return normal if mode_string.blank? mode_sym = mode_string.to_sym - raise ::EventSource::Error::InvalidModeError, "\"#{mode_string}\" is an invalid mode. Must be empty, null, \"normal\", or \"web\"." if ![:web, :normal].include?(mode_sym) + raise ::EventSource::Error::InvalidModeError, "\"#{mode_string}\" is an invalid mode. Must be empty, null, \"normal\", or \"publisher\"." if ![:web, :publisher].include?(mode_sym) self.new(mode_string.to_sym) end end diff --git a/lib/event_source/protocols/amqp/bunny_queue_proxy.rb b/lib/event_source/protocols/amqp/bunny_queue_proxy.rb index 63f69b5..6f439fb 100644 --- a/lib/event_source/protocols/amqp/bunny_queue_proxy.rb +++ b/lib/event_source/protocols/amqp/bunny_queue_proxy.rb @@ -74,8 +74,8 @@ def subscribe(subscriber_klass, bindings) @channel_proxy.subject.prefetch(prefetch) # Do not spawn consumers in the 'webserver' mode - if ::EventSource.config.mode.web? - logger.debug "In web mode, not booting subscription" + if ::EventSource.config.mode.publisher? + logger.debug "In publisher mode, not booting subscription" return end