0
votes

So I am new to AWS SQS, I watched a few tutorials and it was mentioned that messages in the queue are not deleted and they remain in the queue (retention period is set by us), there is a visibility timeout and if one consumer is consuming that message the other consumer will have to wait till the visibility timeout get's over. After the visibility timeout is over the other consumer can access the message.

Now in another tutorial, a person consumed the message using SQSListner, it was a spring boot app, and after the consumption, the message was automatically deleted from the queue, how did it happen?

@SqsListener("javatechie-queue")
 public void loadMessageFromSQS(String message)  {
        logger.info("message from SQS Queue {}",message);
    }