Class: Euston::RabbitMq::RetryingSubscription

Inherits:
Object
  • Object
show all
Includes:
Exchanges, Queues, Hollywood
Defined in:
lib/euston-rabbitmq/euston/retrying_subscription.rb

Instance Method Summary collapse

Methods included from Exchanges

#default_exchange_options, #default_publish_options, #get_exchange

Methods included from Queues

#default_queue_options, #get_queue

Constructor Details

#initialize(channel, queue_name, logger = Euston::NullLogger.instance) ⇒ RetryingSubscription

Returns a new instance of RetryingSubscription.



8
9
10
11
12
# File 'lib/euston-rabbitmq/euston/retrying_subscription.rb', line 8

def initialize channel, queue_name, logger = Euston::NullLogger.instance
  @channel = channel
  @queue_name = queue_name
  @log = logger
end

Instance Method Details

#getObject



18
19
20
# File 'lib/euston-rabbitmq/euston/retrying_subscription.rb', line 18

def get
  queue.safe_get
end

#subscribeObject



14
15
16
# File 'lib/euston-rabbitmq/euston/retrying_subscription.rb', line 14

def subscribe
  queue.safe_subscribe
end