Exception handling with SqsTemplate

59 views Asked by At

I have a Spring Boot app v3.2.1, and I'm using spring-cloud-aws-starter-sqs v3.1.0.

I saw this example for sending a message to the queue, but it doesn't address error handling at all:

sqsTemplate
    .send(sqsSendOptions ->
        sqsSendOptions
            .queue("myqueue")
            .payload(message)
    );

How do you handle errors if sending a message to the queue fails?

Thanks.

0

There are 0 answers