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

Skip invalid Kafka messages during Fetch #774

Merged
merged 4 commits into from
Feb 4, 2024

Conversation

ankitk-me
Copy link
Contributor

No description provided.

Copy link
Contributor

@jfallows jfallows left a comment

Choose a reason for hiding this comment

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

Looks good, we just need to improve the log messages.

timestamp namespace.binding: Skipping invalid message on topic abc, partition N, offset M

?

Comment on lines 518 to 519
System.out.println(String.format("%s %s: Skipping invalid message on topic %s, partition %d, offset %d",
System.currentTimeMillis(), bindingName, topic, id, offset));
Copy link
Contributor

Choose a reason for hiding this comment

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

Later, we're going to be logging to the EngineContext, and we usually don't pass strings around for bindings, just binding ids.

Let's change the method signature to put EngineContext and bindingId as the first 2 parameters. Note that bindingId is already there as routedId in KafkaCacheServerFetchFanout.

Suggested change
System.out.println(String.format("%s %s: Skipping invalid message on topic %s, partition %d, offset %d",
System.currentTimeMillis(), bindingName, topic, id, offset));
System.out.printf("%s:%s %s: Skipping invalid message on topic %s, partition %d, offset %d\n",
System.currentTimeMillis(), context.supplyNamespace(bindingId), context.supplyLocalName(bindingId), topic, id, offset);

Also, let's put these printfs inside conditional if based on EngineConfiguration.verbose().

@jfallows jfallows merged commit bd3d0f2 into aklivity:develop Feb 4, 2024
5 checks passed
@ankitk-me ankitk-me deleted the invalidMessage branch February 5, 2024 14:23
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.

2 participants