Java:Read messages from AWS SQS using ReceiveMessageRequest

0

I have a use case where I need to read the messages from the SQS queue as and when it arrives. Note: I'm can't use @SqsListener spring cloud aws. I'm trying to get it done only with aws java SDK

asked a year ago638 views
1 Answer
0

Please take a look at this document to understand the difference between short (default) and long polling - https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html

With short polling, your probability of getting the messages as soon as they arrive are high as explained in the above document.

If you need Java SDK examples of SQS, this document can help you - https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/examples-sqs.html

profile pictureAWS
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions