Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Sample is NOT usable. (Functions deletes message even if ACI task fails) #10

Open
craiglytle opened this issue Aug 3, 2019 · 0 comments

Comments

@craiglytle
Copy link

[X] feature request
[X] Bug (in any real-world use case)

Recreate:

Run sample as is, but modify ACI worker to fail.

Logs from Failure

None

Expected/desired behavior

If ACI worker fails, the queue message should eventually be put back into the queue.
We handle this by passing the queueMessage.id to the ACI code and having it be responsible for deleting the message just before the ACI

OS and Version?

Any and all

Versions

Any and All

Currently when Azure Functions is triggered by a Queue, it will delete the associated queueMessage if and when the Functions completes successfully. This may be a nice feature when the task is run within Functions, but it's a deal breaker when a long-running task is run within the ACI as a detached container.

And that's exactly the point of this sample.

The queueMessage is deleted as soon as Functions finishes launching the ACI. That means that if the task running in the ACI fails, the queueMessage can't be added back to the queue. Any task that fails in the ACI will dissapear and never be run.
That is NOT how task queues are supposed to work. So, it is NOT possible to use Queues to trigger Functions to launch ACI. (Unless a feature is added to Functions that turns off the auto-delete-message feature)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant