module RabbitmqClient

RabbitmqClient Module is used as a clinet library for Rabbitmq This Module is supporting the following use cases

Constants

VERSION

Public Class Methods

add_exchange(name, type, options = {}) click to toggle source
# File lib/rabbitmq_client.rb, line 70
def add_exchange(name, type, options = {})
  @exchange_registry.add(name, type, options)
end
lifecycle() click to toggle source
# File lib/rabbitmq_client.rb, line 78
def lifecycle
  @lifecycle ||= setup_lifecycle
end
logger() click to toggle source
# File lib/rabbitmq_client.rb, line 82
def logger
  @logger ||= setup_logger
end
publish(payload, options = {}) click to toggle source
# File lib/rabbitmq_client.rb, line 74
def publish(payload, options = {})
  publisher.publish(payload, options)
end

Private Class Methods

init_publisher() click to toggle source
# File lib/rabbitmq_client.rb, line 96
def init_publisher
  Publisher.new(config.merge(
                  exchange_registry: @exchange_registry
                ))
end
publisher() click to toggle source
# File lib/rabbitmq_client.rb, line 92
def publisher
  @publisher ||= init_publisher
end
setup_lifecycle() click to toggle source
# File lib/rabbitmq_client.rb, line 102
def setup_lifecycle
  @lifecycle = Lifecycle.new
  plugins.each(&:new)
  @lifecycle
end
setup_logger() click to toggle source
# File lib/rabbitmq_client.rb, line 88
def setup_logger
  LoggerBuilder.new(config[:logger_configs]).build_logger
end