module Hutch
Constants
- VERSION
Public Class Methods
broker()
click to toggle source
# File lib/hutch.rb, line 46 def self.broker @broker end
connect(options = {}, config = Hutch::Config)
click to toggle source
# File lib/hutch.rb, line 35 def self.connect(options = {}, config = Hutch::Config) unless connected? @broker = Hutch::Broker.new(config) @broker.connect(options) end end
connected?()
click to toggle source
# File lib/hutch.rb, line 50 def self.connected? return false unless broker return false unless broker.connection broker.connection.open? end
consumers()
click to toggle source
# File lib/hutch.rb, line 19 def self.consumers @consumers ||= [] end
disconnect()
click to toggle source
# File lib/hutch.rb, line 42 def self.disconnect @broker.disconnect if @broker end
global_properties()
click to toggle source
# File lib/hutch.rb, line 31 def self.global_properties @global_properties ||= {} end
global_properties=(properties)
click to toggle source
# File lib/hutch.rb, line 27 def self.global_properties=(properties) @global_properties = properties end
logger()
click to toggle source
# File lib/hutch.rb, line 23 def self.logger Hutch::Logging.logger end
publish(*args)
click to toggle source
# File lib/hutch.rb, line 56 def self.publish(*args) broker.publish(*args) end
register_consumer(consumer)
click to toggle source
# File lib/hutch.rb, line 15 def self.register_consumer(consumer) self.consumers << consumer end