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

AbstractKafkaStreamsBinderProcessor ignores TimestampExtractor configuration starting with kafka-streams 3.7.0 #2922

Closed
qxv1612 opened this issue Mar 19, 2024 · 2 comments
Labels
Milestone

Comments

@qxv1612
Copy link

qxv1612 commented Mar 19, 2024

Hello,

about this code snippet starting at AbstractKafkaStreamsBinderProcessor:627 (version 4.1.0):

	if (timestampExtractor != null) {
		consumed.withTimestampExtractor(timestampExtractor);
	}

"consumed" is an Consumed-instance which is part of kafka-streams.

In kafka-streams 3.6.1 a call to consumed.withTimestampExtractor() changes the existing instance.
Since kafka-streams 3.7.0 the same call creates a new instance of "Consumed", but the code above ignores this new instance.
In the end, the timestampExtractor is not used at all since kafka 3.7.0.

Same for "consumed.withName" a couple of lines below.

IMHO this is a big change in kafka-streams inside a minor version change.

To fix this anyway the code above might be changed to

	if (timestampExtractor != null) {
		consumed = consumed.withTimestampExtractor(timestampExtractor);
	}

Regards,

Ralf

@qxv1612 qxv1612 changed the title Broken use of timestampExtractor in AbstractKafkaStreamsBinderProcessor with kafka-streams 3.7.0 AbstractKafkaStreamsBinderProcessor ignores TimestampExtractor starting with kafka-streams 3.7.0 Mar 19, 2024
@qxv1612 qxv1612 changed the title AbstractKafkaStreamsBinderProcessor ignores TimestampExtractor starting with kafka-streams 3.7.0 AbstractKafkaStreamsBinderProcessor ignores TimestampExtractor configuration starting with kafka-streams 3.7.0 Mar 19, 2024
@sobychacko
Copy link
Contributor

@qxv1612 Your fix makes sense. If you are willing, please feel free to send a PR with the fix. Otherwise, we will look into it later. Thanks!

@sobychacko sobychacko added the bug label Mar 19, 2024
@sobychacko sobychacko added this to the 4.1.1 milestone Mar 19, 2024
@qxv1612
Copy link
Author

qxv1612 commented Mar 20, 2024

Hello @sobychacko,
I forked the repo and created the PR based on the main branch. I'm not sure if this is the right method.

A local build currently fails in KafkaBinderTests, but I expect its related to my local env settings.
Actually I started the same test with the current main branch.

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

No branches or pull requests

2 participants