Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS SQS NACK doing nothing? #2635

Open
spc16670 opened this issue May 22, 2024 · 5 comments
Open

AWS SQS NACK doing nothing? #2635

spc16670 opened this issue May 22, 2024 · 5 comments
Labels
enhancement New feature or request sqs

Comments

@spc16670
Copy link

When nacking SQS message I would expect it to the immediately returned back to the broker i.e. NACKing should set the VisibilityTimeout to 0. Current implementation does not seem to do anything.

https://github.com/smallrye/smallrye-reactive-messaging/blob/4.21.0/smallrye-reactive-messaging-aws-sqs/src/main/java/io/smallrye/reactive/messaging/aws/sqs/SqsMessage.java#L120

Also is there a way to manually extend the message's VisibilityTimeout in case it is about to expire when the processing takes longer than expected?

@ozangunalp
Copy link
Collaborator

Thank you for your feedback, the SQS connector is still in preview and if you are willing to contribute I can help to get in a configurable failure handler to change the message visibility of the nacked message.

@ozangunalp ozangunalp added sqs enhancement New feature or request labels May 23, 2024
@prakashelango
Copy link

@ozangunalp am kind of thinking to contribute on this. Can you please give me some directions

@ozangunalp
Copy link
Collaborator

@prakashelango that's great news!

You can do like the ack handler already existing on the SqsMessage, to add a failure handler. A first implementation for that failure handler would do nothing (current strategy) and a second implementation would do a call using the consumer client to send a request to set message visibility to 0 using the message id.

The connector channel can receive an attribute to choose between two strategies.

There are some other examples on other connectors. You can also check those.

@adampoplawski
Copy link

@prakashelango are you planning to contribute? If no maybe I can do it after we merge first one: quarkiverse/quarkus-amazon-services#1414

@prakashelango
Copy link

@adampoplawski am in midst, need to test it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sqs
Projects
None yet
Development

No branches or pull requests

4 participants