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

Add support to infer kafka key and value deserializer types when batch is enabled #598

Merged

Conversation

dhofftgt
Copy link
Contributor

@dhofftgt dhofftgt commented Oct 7, 2022

I ran into #502. Taking a stab at fixing it.

It looks like when using a batch listener with a parameter of List<ConsumerRecord<K,V>> the framework picks a List deserializer instead of looking at the ConsumerRecord type args. With this change, it will look at the type args of the ConsumerRecord to determine the kafka message deserializer

This should resolve #502

@CLAassistant
Copy link

CLAassistant commented Oct 7, 2022

CLA assistant check
All committers have signed the CLA.

@dhofftgt dhofftgt marked this pull request as draft November 14, 2022 21:19
@dhofftgt dhofftgt force-pushed the infer-batch-deserializers branch 3 times, most recently from 7659056 to bcee29b Compare November 22, 2022 19:30
…nsumerRecords

It looks like when using a batch listener with a parameter of List<ConsumerRecord<K,V>> the framework picks a List deserializer instead of looking at the ConsumerRecord type args. With this change, it will look at the type args of the ConsumerRecord to determine the kafka message deserializer
@dhofftgt dhofftgt marked this pull request as ready for review November 22, 2022 19:33
Copy link

@Crow-EH Crow-EH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I patched one of my projects with your modifications and it runs flawlessly in production. 👍

Thanks !

@graemerocher graemerocher merged commit 9586865 into micronaut-projects:master Feb 9, 2023
@rnkoaa rnkoaa mentioned this pull request Mar 11, 2023
@larsduelfer
Copy link

Hi, is there any ETA when this change is being released? I am desperately looking to incorporate this change :-) Thanks in advance for an answer @graemerocher .

@iNviNho
Copy link

iNviNho commented Aug 11, 2023

Can we release this? #811

sdelamo pushed a commit that referenced this pull request Mar 22, 2024
…nsumerRecords (#598)

It looks like when using a batch listener with a parameter of List<ConsumerRecord<K,V>> the framework picks a List deserializer instead of looking at the ConsumerRecord type args. With this change, it will look at the type args of the ConsumerRecord to determine the kafka message deserializer
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 this pull request may close these issues.

Support for Batch ConsumerRecord consumption.
7 participants