Sha256: 3a478f905728d6526ff1d8b53ce1ff5299cc53cf27e8700d3959303632a99b2a

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

Appfuel::Initialize.define('global.message_broker') do |config, container|
  unless config.key?(:sneakers)
    fail "[initializer message_broker] :sneakers not found"
  end

  unless container['message_brokers.consumer_keys'].is_a?(Array)
    fail "[initializer message_broker] message_broker.consumer_keys " +
         "must be an Array"
  end

  require 'sneakers'
  require 'sneakers/runner'
  require 'sneakers/handlers/maxretry'

  settings = config[:sneakers]
  settings[:log] = settings.delete(:logfile)

  Sneakers.configure(settings)


  container.register("message_brokers.runner_class", Sneakers::Runner)
  nil
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
appfuel-service-0.4.2 lib/appfuel/service/initializers/message_broker.rb
appfuel-service-0.4.1 lib/appfuel/service/initializers/message_broker.rb
appfuel-service-0.3.4 lib/appfuel/service/initializers/message_broker.rb