Class: Warren::Den
- Inherits:
-
Object
- Object
- Warren::Den
- Defined in:
- lib/warren/den.rb
Overview
A Den is in charge of creating a Fox from a consumer configuration It handles the registration of dead-letter queues, and configuration of subscriptions and delay exchanges
Constant Summary collapse
- DEFAULT_WORKER_COUNT =
The number of simultaneous workers generated by default
3
Instance Method Summary collapse
- #fox ⇒ Object
-
#initialize(app_name, config, adaptor:) ⇒ Den
constructor
Create a Fox work pool.
-
#register_dead_letter_queues ⇒ Void
Ensures the dead_letter queues and exchanges are registered.
Constructor Details
Instance Method Details
#fox ⇒ Object
30 31 32 |
# File 'lib/warren/den.rb', line 30 def fox @fox ||= spawn_fox end |
#register_dead_letter_queues ⇒ Void
Ensures the dead_letter queues and exchanges are registered.
38 39 40 41 42 43 44 45 46 |
# File 'lib/warren/den.rb', line 38 def register_dead_letter_queues config = dead_letter_config return unless config Warren.handler.with_channel do |channel| subscription = Warren::Subscription.new(channel: channel, config: config) subscription.activate! end end |