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

KAFKA-12297 - Make MockProducer return RecordMetadata with values as per contract #10110

Closed
wants to merge 3 commits into from

Conversation

aadubey
Copy link
Contributor

@aadubey aadubey commented Feb 11, 2021

This is a simple change to MockProducer as per request in KAFKA-12297.
MockProducer currently returns a null RecordMetadata on Exception. The fix will make MockProducer return the right value as per specification.

This only impacts clients which use send with a custom callback and try to then use the RecordMetadata inspite of getting an exception. This should mostly impact customer unit and integration tests as the mock end point was never intended for use in a real Kafka cluster.

@omkreddy omkreddy self-requested a review February 11, 2021 18:14
aadubey and others added 3 commits February 13, 2021 02:19
…cordMetadata class on exception to honour the completion contract for exception scenario
Copy link
Contributor

@omkreddy omkreddy left a comment

Choose a reason for hiding this comment

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

@aadubey Thanks for the PR. LGTM.

@omkreddy omkreddy closed this in b3313b8 Feb 13, 2021
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