You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
Fixing the DryIoC exceptions is one thing. There is however no guarantee that such situations will not occur again.
I propose a slighty modified flow, where the user is able to decide whether the checkpoint should be progressed or not, if there is an unhandled user exception. This can be done through a setting in host.json.
I forked the repo and made a pull request to demonstrate. There is also a MyGet package if you want to test. Currently, in the PR, it is hardcoded to not progress the checkpoint.
If you are interested in pursuing the proposal I am happy to complete the pull request with any further instructions.
Albeit I am not able to really reproduce the DryIoC exception in a test environment, we can reproduce that DryIoC exceptions, in the function scope, will be treated as user exceptions, by doing the following:
i was surprised by this behaviour, but stream hub really is suppose to just keep chugging away. retries and an optional poison hub might make sense for certain scenarios. I've found it advances it even if it's more extension type exceptions like json deserialization error in the binding. i'd love to throw those to a poison queue and keep on chugging.
The current EventHubListener.cs implementation progresses the checkpoint if there is an unhandled exception in user code.
See EventHubListener.cs:
azure-functions-eventhubs-extension/src/Microsoft.Azure.WebJobs.Extensions.EventHubs/Listeners/EventHubListener.cs
Lines 155 to 227 in e263c0c
Unfortunately, internal exceptions in DryIoC are treated as user exceptions, and the user has no way of catching them.
Azure/azure-webjobs-sdk#2432
Azure/azure-functions-host#5240
Fixing the DryIoC exceptions is one thing. There is however no guarantee that such situations will not occur again.
I propose a slighty modified flow, where the user is able to decide whether the checkpoint should be progressed or not, if there is an unhandled user exception. This can be done through a setting in host.json.
I forked the repo and made a pull request to demonstrate. There is also a MyGet package if you want to test. Currently, in the PR, it is hardcoded to not progress the checkpoint.
PR: xzuttz#1
If you are interested in pursuing the proposal I am happy to complete the pull request with any further instructions.
Albeit I am not able to really reproduce the DryIoC exception in a test environment, we can reproduce that DryIoC exceptions, in the function scope, will be treated as user exceptions, by doing the following:
Visual Studio will stop at the breakpoint in step 2
Visual Studio will stop at the breakpoint in step 4
The HTTP trigger will not return.
The logs will say that the DryIoC exception came from the HTTP trigger context, thus the checkpoint will be progressed by the EventHubListener.
The text was updated successfully, but these errors were encountered: