Module: Liebre::Adapter::Interface::Queue

Included in:
Bunny::Queue
Defined in:
lib/liebre/adapter/interface/queue.rb

Instance Method Summary collapse

Instance Method Details

#ack(info, opts = {}) ⇒ Object

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/liebre/adapter/interface/queue.rb', line 22

def ack info, opts = {}
  raise NotImplementedError, "All adapters must implement queue ack(info, opts) to ack messages"
end

#bind(exchange, opts = {}) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/liebre/adapter/interface/queue.rb', line 10

def bind exchange, opts = {}
  raise NotImplementedError, "All adapters must implement queue bind(exchange, opts) to bind the queue to an exchange"
end

#get(opts = {}, &block) ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/liebre/adapter/interface/queue.rb', line 14

def get opts = {}, &block
  raise NotImplementedError, "All adapters must implement queue get(opts, &block) to get messages"
end

#nack(info, opts = {}) ⇒ Object

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/liebre/adapter/interface/queue.rb', line 26

def nack info, opts = {}
  raise NotImplementedError, "All adapters must implement queue nack(info, opts) to nack messages"
end

#nameObject

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/liebre/adapter/interface/queue.rb', line 6

def name
  raise NotImplementedError, "All adapters must implement queue name() to get the name of the queue"
end

#reject(info, opts = {}) ⇒ Object

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/liebre/adapter/interface/queue.rb', line 30

def reject info, opts = {}
  raise NotImplementedError, "All adapters must implement queue reject(info, opts) to reject messages"
end

#subscribe(opts = {}, &block) ⇒ Object

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/liebre/adapter/interface/queue.rb', line 18

def subscribe opts = {}, &block
  raise NotImplementedError, "All adapters must implement queue subscribe(opts, block) consume messajes constantly"
end