Time to Live TTL can be used to update the new visibility timeout value feature ? #2984
Unanswered
padhumailin
asked this question in
Q&A
Replies: 1 comment
-
|
Microsoft.Azure.DocumentDb.Core also doesn't have UpdateDocument, it only has ReplaceDocument API's. Please note that Replace will fail if the Item doesn't exist already. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
while update nuget package from Microsoft.Azure.DocumentDB.Core to Microsoft.Azure.Cosmos.
We have existing method in queueclient to update the visibility time duration, in case of failed queue process
Task<Response<UpdateReceipt>> UpdateMessageAsync(string messageId, string popReceipt, string messageText = null, TimeSpan visibilityTimeout = default, CancellationToken cancellationToken = default);to migrate this method, i have seen TTL (time to live) in Microsoft.Azure.Cosmos.
does these methods meant for same purpose?
https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-time-to-live?tabs=dotnetv3%2Cjavav3#reset-time-to-live
`// This examples leverages the Sales Order class above.
// Read a document, update its TTL, save it.
ItemResponse itemResponse = await client.GetContainer("database", "container").ReadItemAsync("SO05", new PartitionKey("CO18009186470"));
itemResponse.Resource.ttl = 60 * 30 * 30; // update time to live
await client.GetContainer("database", "container").ReplaceItemAsync(itemResponse.Resource, "SO05");`
can i use ReplaceItemAsync method in place of UpdateMessageAsync?
Beta Was this translation helpful? Give feedback.
All reactions