1

Here's my basic code to send an SQS message from C# using the AWS .NET SDK. How can I give the message a different timeout other than the queue default?

 public async Task PostMessage(Uri queueUrl, string body) { var request = new SendMessageRequest() { MessageBody = body, QueueUrl = queueUrl.ToString(), }; var result = await this.client.SendMessageAsync(request); } 

I can send a separate API call to extend the timeout of an in-flight message. But I'd like to do this at the time of creation if that's practical to do.

1 Answer 1

2

You can't do it with C# API or with any other API. Message visibility timeout is set globally on a queue.

I would suggest to create 2 queues. One for short tasks and one for long tasks. This way you can set different visibility timeouts on the queues.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.