Skip to content

raovikash/sqs-listener-spring-boot3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SQS message listener with spring boot 3

Add following in pom.xml

<dependency>
    <groupId>io.awspring.cloud</groupId>
    <artifactId>spring-cloud-aws-starter-sqs</artifactId>
</dependency>

<!-- Use BOM provided by spring for version managament -->
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.awspring.cloud</groupId>
            <artifactId>spring-cloud-aws-dependencies</artifactId>
            <version>3.0.1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
  • Use io.awspring.cloud.sqs.annotation.SqsListener to listen the messages instead of io.awspring.cloud.messaging.listener.annotation.SqsListener
  • If "Visibility timeout" of SQS is less than listener's processing time then message needs to be deleted explicitly from the queue, otherwise same message could be processed multiple times.

Check reference for more details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages