class Emque::Producing::Configuration

Attributes

app_name[RW]
error_handlers[RW]
ignored_exceptions[RW]
log_publish_message[RW]
middleware[R]
publish_messages[RW]
publishing_adapter[RW]
rabbitmq_options[R]

Public Class Methods

new() click to toggle source
# File lib/emque/producing/configuration.rb, line 15
def initialize
  @app_name = ""
  @publishing_adapter = :rabbitmq
  @error_handlers = []
  @log_publish_message = false
  @publish_messages = true
  @rabbitmq_options = {
    :url => "amqp://guest:guest@localhost:5672"
  }
  @ignored_exceptions = [Emque::Producing::Message::MessagesNotSentError]
  @middleware = []
end

Public Instance Methods

use(callable) click to toggle source
# File lib/emque/producing/configuration.rb, line 28
def use(callable)
  unless callable.respond_to?(:call) and callable.arity == 1
    raise(
      ConfigurationError,
      "#{self.class.name}#use must receive a callable object with an " +
      "arity of one."
    )
  end

  @middleware << callable
end