awslabs / awslabs/amazon-sqs-java-messaging-lib

Custom receive timeout for nack with SQS using JMS

Open
#75 16 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
183
Forks
150
PR merge metrics
No merged PRs in 30d

Description

The behavior of negative acknowledgment is to change the visibility timeout of a received message to 0. Where the value of NACK_TIMEOUT is not configurable while creating the SQS Factory for JMS.

https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/master/src/main/java/com/amazon/sqs/javamessaging/acknowledge/NegativeAcknowledger.java#L99

When a message is received, and the processing fails (Listener method throws an error), the message is immediately received again. In most of the cases, the message can be processed with a certain delay.

Is it possible to configure it to not change the visibility timeout, so it respects the Queue's default Receive Timeout configuration?

PS - I originally asked on [Stackoverflow](https://stackoverflow.com/questions/54460735/custom-receive-timeout-for-nack-with-sqs-using-jms)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.