Class: Pgbus::QueueFactory::StandardStrategy
- Inherits:
-
Object
- Object
- Pgbus::QueueFactory::StandardStrategy
- Defined in:
- lib/pgbus/queue_factory.rb
Overview
Standard single-queue strategy: one PGMQ queue per logical name.
Instance Method Summary collapse
-
#initialize(config) ⇒ StandardStrategy
constructor
A new instance of StandardStrategy.
- #physical_queue_names(name) ⇒ Object
- #priority? ⇒ Boolean
- #target_queue(name, _priority) ⇒ Object
Constructor Details
#initialize(config) ⇒ StandardStrategy
Returns a new instance of StandardStrategy.
21 22 23 |
# File 'lib/pgbus/queue_factory.rb', line 21 def initialize(config) @config = config end |
Instance Method Details
#physical_queue_names(name) ⇒ Object
25 26 27 |
# File 'lib/pgbus/queue_factory.rb', line 25 def physical_queue_names(name) [@config.queue_name(name)] end |
#priority? ⇒ Boolean
33 34 35 |
# File 'lib/pgbus/queue_factory.rb', line 33 def priority? false end |
#target_queue(name, _priority) ⇒ Object
29 30 31 |
# File 'lib/pgbus/queue_factory.rb', line 29 def target_queue(name, _priority) @config.queue_name(name) end |