public class NegativeAcknowledger extends BulkSQSOperation
Negative acknowledge resets the visibility timeout of a message, so that the
message can be immediately available to consume. This is mostly used on
recover and close methods.
Negative acknowledge can potentially cause duplicate deliveries.
| Constructor and Description |
|---|
NegativeAcknowledger(AmazonSQSMessagingClientWrapper amazonSQSClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
action(java.lang.String queueUrl,
java.util.List<java.lang.String> receiptHandles)
Action call block for negative acknowledge for the list of receipt
handles.
|
void |
bulkAction(java.util.ArrayDeque<SQSMessageConsumerPrefetch.MessageManager> messageQueue,
java.lang.String queueUrl)
Bulk action for negative acknowledge on the list of messages of a
specific queue.
|
bulkActionpublic NegativeAcknowledger(AmazonSQSMessagingClientWrapper amazonSQSClient)
public void bulkAction(java.util.ArrayDeque<SQSMessageConsumerPrefetch.MessageManager> messageQueue, java.lang.String queueUrl) throws JMSException
messageQueue - Container for the list of message managers.queueUrl - The queueUrl of the messages, which they received from.JMSException - If action throws.public void action(java.lang.String queueUrl,
java.util.List<java.lang.String> receiptHandles)
throws JMSException
action in class BulkSQSOperationqueueUrl - The queueUrl of the queue, which the receipt handles belong.receiptHandles - The list of handles, which is be used to negative acknowledge
the messages via using
changeMessageVisibilityBatch.JMSException - If changeMessageVisibilityBatch throws.