How get message Visibility Timeout value in Lambda?

0

Hi! How can I get a message VisibilityTimeout value in Lambda (Node.js script) triggered by SQS? I need to change this value for staying the message in Queue for a longer period for next processing. Or how can I get the VisibilityTimeout value of the Queue itself programmatically? P.S. I'm deploying the stack via serverless-framework.

Oleksa
gefragt vor 2 Jahren676 Aufrufe
1 Antwort
1
Akzeptierte Antwort

Usually you can get the message visibility timeout when you make a call to get_messages, however, when invoked with Lambda, the Lambda service makes the call to get_messages, and it seems it does not ask for this attribute.

You could make a call to get_queue_attributes to the get the defines visibility timeout on the queue, but remember that you can override this value for individual messages when your message producer sends the messages to the queue.

profile pictureAWS
EXPERTE
Uri
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen