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

質問済み 1年前638ビュー
1回答
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
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン