Module: SongkickQueue::Consumer::ClassMethods
- Defined in:
- lib/songkick_queue/consumer.rb
Instance Method Summary collapse
- #config ⇒ Object
-
#consume_from_queue(queue_name) ⇒ Object
Define the name of the queue this consumer with process messages from.
-
#queue_name ⇒ Object
Return the quene name set by #consume_from_queue.
Instance Method Details
#config ⇒ Object
23 24 25 |
# File 'lib/songkick_queue/consumer.rb', line 23 def config SongkickQueue.configuration end |
#consume_from_queue(queue_name) ⇒ Object
Define the name of the queue this consumer with process messages from
9 10 11 |
# File 'lib/songkick_queue/consumer.rb', line 9 def consume_from_queue(queue_name) @queue_name = queue_name end |
#queue_name ⇒ Object
Return the quene name set by #consume_from_queue
16 17 18 19 20 21 |
# File 'lib/songkick_queue/consumer.rb', line 16 def queue_name @queue_name or fail(NotImplementedError, 'you must declare a queue name to consume from ' + 'by calling #consume_from_queue in your consumer class. See README for more info.') [config.queue_namespace, @queue_name].compact.join('.') end |