Code Monkey home page Code Monkey logo

Comments (4)

paoloc0 avatar paoloc0 commented on June 14, 2024

I see that I can override the default exception handler via SQSMessageConsumerBuilder's withExceptionHandler. But having a sleep state in SQSQueueUtils.DEFAULT_EXCEPTION_HANDLER would still be a safer default. For instance, there seems to be the same problem in AmazonSQSRequesterClient, and I don't see a way to set an exceptionHandler for it to override the default one (I guess that would be a related feature request).

from amazon-sqs-java-temporary-queues-client.

robin-aws avatar robin-aws commented on June 14, 2024

Definitely not a bad idea to handle this better. There's already a sleep in place for QueueNotFoundExceptions for a similar reason. :) https://github.com/awslabs/amazon-sqs-java-temporary-queues-client/blob/master/src/main/java/com/amazonaws/services/sqs/util/SQSMessageConsumer.java#L126

That's a little more straight-forward, though, since that exception means it's very unlikely that immediately retrying will succeed. I wouldn't want to assume that about all exceptions, so I'm nervous about introducing an unconditional sleep. Perhaps we could hook up a configurable RetryPolicy? https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/retry/RetryPolicy.html

from amazon-sqs-java-temporary-queues-client.

paoloc0 avatar paoloc0 commented on June 14, 2024

Whatever the mechanism, I think the most important is that the error handling is in the library user's control, which it is for consumers, but not for requesters. If I can override the default, I guess it wouldn't matter to me what the default behaviour was. (But yes, a RetryPolicy does look like a nice way to go.)

from amazon-sqs-java-temporary-queues-client.

yzhang-okta avatar yzhang-okta commented on June 14, 2024

Hi, anyone fixing this ?

from amazon-sqs-java-temporary-queues-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.