Skip to content

KAFKA-7449 Forward topic from console consumer to deserializer#5704

Merged
junrao merged 1 commit intoapache:trunkfrom
mchataigner:deserializer
Nov 29, 2018
Merged

KAFKA-7449 Forward topic from console consumer to deserializer#5704
junrao merged 1 commit intoapache:trunkfrom
mchataigner:deserializer

Conversation

@mchataigner
Copy link
Copy Markdown
Contributor

Some deserializer needs the topic name to be able to correctly deserialize the payload of the message.
Console consumer works great with Deserializer however it calls deserializer with topic set as null.
This breaks the API and the topic information is available in the ConsumerRecord.

More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.

Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@omkreddy
Copy link
Copy Markdown
Contributor

LGTM

@chia7712
Copy link
Copy Markdown
Member

LGTM. Does it need a test? ConsoleConsumerTest should be a suitable place.

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Sep 29, 2018

Yes, a test would be good.

@mchataigner
Copy link
Copy Markdown
Contributor Author

Done (sorry for the delay).

@mchataigner
Copy link
Copy Markdown
Contributor Author

I don't realy understand why the build on JDK 11 with Scala 2.12 is ending in timeout.
I'm not sure it's related to my change.

Some deserializer needs the topic name to be able to correctly deserialize the payload of the message.
Console consumer works great with Deserializer<String> however it calls deserializer with topic set as null.
This breaks the API and the topic information is available in the ConsumerRecord.
@gardnervickers
Copy link
Copy Markdown
Contributor

Hmm not sure why the test is being skipped for the JDK 8 build, lets have Jenkins rerun the tests.
Retest this please

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@mchataigner : Thanks for the patch. LGTM

@junrao junrao merged commit fb9f2d8 into apache:trunk Nov 29, 2018
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
Some deserializer needs the topic name to be able to correctly deserialize the payload of the message.
Console consumer works great with Deserializer<String> however it calls deserializer with topic set as null.
This breaks the API and the topic information is available in the ConsumerRecord.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Gardner Vickers <gardner@vickers.me>, Jun Rao <junrao@gmail.com>
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.

6 participants