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

posta un anno fa638 visualizzazioni
1 Risposta
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
ESPERTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande