Class: SongkickQueue::Client
- Inherits:
-
Object
- Object
- SongkickQueue::Client
- Defined in:
- lib/songkick_queue/client.rb
Instance Method Summary collapse
-
#channel ⇒ Bunny::Channel
Creates a memoized channel for issuing RabbitMQ commands.
-
#connection ⇒ Bunny::Session
Creates a memoized connection to RabbitMQ.
- #default_exchange ⇒ Object
Instance Method Details
#channel ⇒ Bunny::Channel
Creates a memoized channel for issuing RabbitMQ commands
10 11 12 13 14 15 16 17 |
# File 'lib/songkick_queue/client.rb', line 10 def channel @channel ||= begin channel = connection.create_channel channel.prefetch(1) channel end end |
#connection ⇒ Bunny::Session
Creates a memoized connection to RabbitMQ
22 23 24 25 26 27 28 29 |
# File 'lib/songkick_queue/client.rb', line 22 def connection @connection ||= begin connection = Bunny.new(config_amqp) connection.start connection end end |
#default_exchange ⇒ Object
3 4 5 |
# File 'lib/songkick_queue/client.rb', line 3 def default_exchange channel.default_exchange end |