Skip to content
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

UDF middleware cannot handle ConsumerRecord with specified generic typing #226

Closed
JeroennC opened this issue Oct 22, 2024 · 2 comments · Fixed by #248
Closed

UDF middleware cannot handle ConsumerRecord with specified generic typing #226

JeroennC opened this issue Oct 22, 2024 · 2 comments · Fixed by #248
Assignees

Comments

@JeroennC
Copy link
Contributor

Describe the bug

When specifying the generic types in ConsumerRecord, e.g. ConsumerRecord[Any, Any] in the stream function signature, the ANNOTATIONS_TO_PARAMS mapping fails to map the consumerrecord to the parameter.

types.ConsumerRecord: cr,

To Reproduce
Create a UDF style stream function with cr: ConsumerRecord[Any, Any]

Expected behavior
It should just work like it does without specifying the generics.

@woile
Copy link
Member

woile commented Oct 22, 2024

Thanks for reporting, we are gonna investigate 👁️ , it might be fixed with the new DI pr #58 but it's still a bit away

@woile woile self-assigned this Nov 7, 2024
@woile
Copy link
Member

woile commented Nov 7, 2024

I've solved this in the DI PR, once merged I think it should work.
I've added some tests:

https://github.com/kpn/kstreams/pull/58/files#diff-77916c37a99b39da8e84fc1b19e7e8688c3074fc7215d1213e163740aa51f5f8R19-R28

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

Successfully merging a pull request may close this issue.

2 participants