Integrate Spring Boot application with AWS SNS/SQS using localstack

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.พ. 2024
  • In this video, we will see how to integrate a spring boot application with AWS SQS/SNS but in the local environment using localstack. We will create a SNS topic, a SQS queue and create SNS subscription with sqs as the protocol. We will demo how to publish notifications to SNS topic. Demo will also cover pushing/listening messages to/from SQS queue
    Github code: github.com/visa2learn/spring-...
    Reference links:
    aws.amazon.com/sns/
    aws.amazon.com/sqs/
    docs.aws.amazon.com/sns/lates...
    docs.localstack.cloud/overview/
    spring.io/projects/spring-clo...
    awspring.io/
    docs.aws.amazon.com/sns/lates...
    #springboot #springcloudaws #localstack #sqs #sns

ความคิดเห็น • 6

  • @sakthinivas1840
    @sakthinivas1840 4 หลายเดือนก่อน +1

    Thanks for sharing, may I know where the properties defined in application.yaml is referred in the application?

    • @visa2learn
      @visa2learn  4 หลายเดือนก่อน

      Those are internally used by spring cloud aws as stated in their documentation page

  • @anakhaaniejose4135
    @anakhaaniejose4135 4 หลายเดือนก่อน +1

    Can I use spring-cloud-aws-sqs dependency instead of starter dependency? But when using that my listener doesn't seem to work. is there is particular reason for using starter dependency?

    • @visa2learn
      @visa2learn  4 หลายเดือนก่อน +1

      Yes the starter dependency auto-configures the SQS integration beans. So those objects are created during application startup. If you do not use the starter, you will have to create the beans yourself.
      docs.awspring.io/spring-cloud-aws/docs/3.1.0/reference/html/index.html#sqs-integration

  • @piumidesh
    @piumidesh 3 หลายเดือนก่อน

    can we use multiple consumers and multiple producers using one queue.how to identify that messages these are for one consumer and these are for another consumer

    • @visa2learn
      @visa2learn  3 หลายเดือนก่อน

      What you can do is use SNS and add multiple SQS as subscribers to this single SNS topic and then add a message filtering in SNS to route the message only to specific queues depending on what the message is. docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html