ContinueAsNew replay behavior #2600
Unanswered
jasonvangundy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm loving durable functions, but am fairly new and may be misunderstanding the expected behavior in this context. I am receiving IoT data on a regular interval and create durable timers whenever I receive a new data message for a device. I am trying to use durable timers pitted against the incoming data to achieve an event when we do not receive data within a certain time threshold. It feels fairly simple. My event hub client just raises an event whenever new data comes in:
I then have an orchestration that is waits for either the time, or the raised event to complete. I'm using the eternal orchestration pattern to do this indefinitely.
The behavior that I'm seeing is:
yield context.df.Task.any([newDataActivity, staleDataTimeoutTask]);
receives the new data event as I would expectcontext.df.continueAsNew(newDataActivity.result);
, the new orchestration invocation hasisReplay = false
as I would expectyield context.df.Task.any([newDataActivity, staleDataTimeoutTask]);
again,isReplay
becomestrue
and the originallyyield
ed value is retrieved, rather than waiting for a new data event.This creates an infinite loop for me locally. I tried augmenting the
continueAsNew
payload, changing one of the IoT data values to see if that changed behavior and it did not seem to.My understanding was that
continueAsNew
would wipe out the orchestration history, preventing any previous history / result history from impacting the newly spawned orchestration's results. Am I misunderstanding this behavior, or is there possibly some other behavior at play that I do not understand?Beta Was this translation helpful? Give feedback.
All reactions