Home > Software engineering >  Delay an SQS message sent via SNS
Delay an SQS message sent via SNS

Time:01-19

I'm using the AWS SDK v3 to push a message to SNS which is then subscribed to by an SQS Queue.

 await snsClient.send(new PublishCommand({
                Message: JSON.stringify(payload),
                TopicArn: process.env[SNS_TOPIC_ARN],
            }));

I want to delay individual messages. Is this possible if I'm pushing them via SNS or do I have to rework it and push directly to SQS?

CodePudding user response:

You can only control the delay on individual messages when sending the messages to the Amazon SQS queue directly.

It is not possible to specify this value when sending the message via an Amazon SNS topic to the Amazon SQS queue.

  • Related