Class: Sqewer::Connection::DeleteBuffer

Inherits:
MessageBuffer show all
Defined in:
lib/sqewer/connection.rb

Overview

Saves the receipt handles to batch-delete from the SQS queue

Constant Summary

Constants inherited from MessageBuffer

MessageBuffer::MAX_RECORDS

Instance Attribute Summary

Attributes inherited from MessageBuffer

#messages

Instance Method Summary collapse

Methods inherited from MessageBuffer

#each_batch, #initialize

Constructor Details

This class inherits a constructor from Sqewer::Connection::MessageBuffer

Instance Method Details

#delete_message(receipt_handle) ⇒ Object



98
99
100
101
102
103
# File 'lib/sqewer/connection.rb', line 98

def delete_message(receipt_handle)
  # The "id" is only valid _within_ the request, and is used when
  # an error response refers to a specific ID within a batch
  m = {receipt_handle: receipt_handle, id: messages.length.to_s}
  messages << m
end