Search code examples
azuretransactionsazure-table-storageazure-queues

Is it possible to have a transaction apply to both an Azure Queue and an Azure Table?


I have a four step sequence I want to put in a transaction.

1) Receive message from Azure Queue in a WebJob

2) Do some very complicated work including launching GIT in the background.

3) Processes some data from Azure Tables, writing result to another Azure Table.

4) Push notification to next workflow via Azure Queue.

I want all of this to be transactional so that any failure prevents the message in step one from being permanently dequeued. Is this possible?


Solution

  • There is no Azure support for this. It is also generally impossible to achieve exactly-once delivery of queue messages.

    Likely, the best solution for you is to use at-least-once delivery (the default) and make message handling idempotent. This means that the message handler must detect if the message was already processed. It could do that by checking Azure Tables to see if the results are already there.