Sha256: 81a101fa702eb52fc92ff8b159fcf930bf9f7c52675fba3c9c316c138695bbd4
Contents?: true
Size: 1.18 KB
Versions: 54
Compression:
Stored size: 1.18 KB
Contents
module ActionSubscriber class Route attr_reader :acknowledgements, :action, :durable, :exchange, :prefetch, :queue, :routing_key, :subscriber, :threadpool_name def initialize(attributes) @acknowledgements = attributes.fetch(:acknowledgements) @action = attributes.fetch(:action) @durable = attributes.fetch(:durable) @exchange = attributes.fetch(:exchange).to_s @prefetch = attributes.fetch(:prefetch) { ::ActionSubscriber.config.prefetch } @queue = attributes.fetch(:queue) @routing_key = attributes.fetch(:routing_key) @subscriber = attributes.fetch(:subscriber) @threadpool_name = attributes.fetch(:threadpool_name) if attributes.has_key?(:concurrency) concurrency = attributes[:concurrency] ::ActionSubscriber.print_deprecation_warning("setting prefetch for #{@queue} to #{concurrency}") @prefetch = concurrency end end def acknowledgements? @acknowledgements end def queue_subscription_options { :manual_ack => acknowledgements? } end end end
Version data entries
54 entries across 54 versions & 1 rubygems