Sha256: 5bbac89fda745ed68721e06259965a372ab6afcc444aaf442aa9ce7fceff662c

Contents?: true

Size: 558 Bytes

Versions: 2

Compression:

Stored size: 558 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_borker.consumer_keys " +
         "must be an Array"
  end

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

  Sneakers.configure(config[:sneakers])


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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
appfuel-service-0.3.3 lib/appfuel/service/initializers/message_broker.rb
appfuel-service-0.3.2 lib/appfuel/service/initializers/message_broker.rb