-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Honor typed handler lifetime #142
Comments
Hi @seruminar, From your description, it seems to be a bug, but we'll check this out and get back to you with further details. |
Hi @luispfgarces thank you for the response! Attached is a Assuming there is Kafka running at
I expect to see just the line |
This is a much needed bug and/or feature request. Any updates? |
Is your request related to a problem you have?
Please let me know if this discussed somewhere 🙂
It appears that a consumer configuration similar to the following is not supported:
Specifically, non-singleton values of
InstanceLifetime
do not imply that a new handler is created when an exception is thrown (deep) inside a handler and it bubbles up all the way to Polly. I can observe this by altering a handler dependency (i.e. setting a property value), watching the retry occur, and then inspecting that altered property.This tends to cause a problem with disposed DB connections 😅
Describe the solution you'd like
Does this make sense? Is there a workaround? Should I try to minimally reproduce in case something else is going on?
Ideally the retry middleware would be placed in a way that creates the handler again as if it was a new incoming message.
Are you able to help bring it to life and contribute with a Pull Request?
No
Additional context
It may not be possible to do this with middlewares based on the implementation of https://github.com/Farfetch/kafkaflow/blob/master/src/KafkaFlow/MiddlewareExecutor.cs
The text was updated successfully, but these errors were encountered: