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

preguntada hace un año641 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas