Class: Synapse::Partitioning::QueueReader Abstract
- Inherits:
-
Object
- Object
- Synapse::Partitioning::QueueReader
- 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
Instance Method Summary collapse
-
#ack_message(receipt) ⇒ undefined
Acknowledges the message, removing it from the original queue.
-
#nack_message(receipt) ⇒ undefined
Attempts to notify the original queue that the message was not processed.
-
#subscribe {|MessageReceipt| ... } ⇒ undefined
abstract
Subscribes the given handler to the queue.
Instance Method Details
#ack_message(receipt) ⇒ undefined
Acknowledges the message, removing it from the original queue
23 |
# File 'lib/synapse/partitioning/queue_reader.rb', line 23 def (receipt); end |
#nack_message(receipt) ⇒ undefined
Attempts to notify the original queue that the message was not processed
29 |
# File 'lib/synapse/partitioning/queue_reader.rb', line 29 def (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.
17 |
# File 'lib/synapse/partitioning/queue_reader.rb', line 17 def subscribe(&handler); end |