Gaurang Shah
Gaurang Shah

Reputation: 12910

Azure Event grid - Delayed Execution

I am working on a design where I need to move files from one Storage account to another storage account. And after let's say a week, delete those files.

One file is going to successfully move I can either either send a message to Event Hub or Write a record into SQL DB

For Deletion of files I have two approach.

I have two approach:

Polling

  1. Poll daily for SQL DB entry and then check the last modified timestamp and delete it.
  2. Update the SQL DB entry for the file and reflect that file is deleted.

Event Based

  1. Send a message to event grid as soon as the file is deleted.

However, I am not able to figure out how to wait for 1 week before I delete a file. If I had to delete file immediately I can do upon receiving message.

Upvotes: 1

Views: 771

Answers (1)

Serkant Karaca
Serkant Karaca

Reputation: 2034

Have you considered using Service Bus queues with schedule feature? Service Bus queues/topics may be a better fit for delayed processing requirement.

https://learn.microsoft.com/en-us/azure/service-bus-messaging/message-sequencing#scheduled-messages

Upvotes: 2

Related Questions