Sha256: 8412cf65acb6d6dd458436e9166307bdcb233e9fadb373ad82d85a339ea85527

Contents?: true

Size: 460 Bytes

Versions: 14

Compression:

Stored size: 460 Bytes

Contents

module Jackhammer
  class TopicManager
    class << self
      def topics
        result = {}
        Jackhammer.configuration.yaml.each do |topic, topic_config|
          fail(InvalidConfigError, "Topic config is invalid") unless topic_config.is_a?(Hash)
          queues = topic_config.delete 'queues'
          result[topic.to_sym] = Topic.new(name: topic, options: topic_config, queue_config: queues)
        end
        result
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
jackhammer-1.5.0 lib/jackhammer/topic_manager.rb
jackhammer-1.5.0.rc lib/jackhammer/topic_manager.rb
jackhammer-1.4.0 lib/jackhammer/topic_manager.rb
jackhammer-1.3.7 lib/jackhammer/topic_manager.rb
jackhammer-1.3.6 lib/jackhammer/topic_manager.rb
jackhammer-1.3.5 lib/jackhammer/topic_manager.rb
jackhammer-1.3.4 lib/jackhammer/topic_manager.rb
jackhammer-1.3.3 lib/jackhammer/topic_manager.rb
jackhammer-1.3.2 lib/jackhammer/topic_manager.rb
jackhammer-1.3.1 lib/jackhammer/topic_manager.rb
jackhammer-1.3.0 lib/jackhammer/topic_manager.rb
jackhammer-1.2.0 lib/jackhammer/topic_manager.rb
jackhammer-1.1.0 lib/jackhammer/topic_manager.rb
jackhammer-1.0.0 lib/jackhammer/topic_manager.rb