Class: Synapse::Partitioning::QueueReader Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/synapse/partitioning/queue_reader.rb

Overview

This class is abstract.

Represents a mechanism for taking messages off a queue and handling the acknowledgement or rejection of each message

Direct Known Subclasses

MemoryQueueReader

Instance Method Summary collapse

Instance Method Details

#ack_message(receipt) ⇒ undefined

Acknowledges the message, removing it from the original queue

Parameters:

Returns:

  • (undefined)


23
# File 'lib/synapse/partitioning/queue_reader.rb', line 23

def ack_message(receipt); end

#nack_message(receipt) ⇒ undefined

Attempts to notify the original queue that the message was not processed

Parameters:

Returns:

  • (undefined)


29
# File 'lib/synapse/partitioning/queue_reader.rb', line 29

def nack_message(receipt); end

#subscribe {|MessageReceipt| ... } ⇒ undefined

This method is abstract.

Subscribes the given handler to the queue

Depending on the implementation, this method may or may not return immediately. It should be assumed that the method will block until a message is received and then will go back to blocking after the given callback is invoked.

Yields:

Returns:

  • (undefined)


17
# File 'lib/synapse/partitioning/queue_reader.rb', line 17

def subscribe(&handler); end