Access to kafka partition per record

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Access to kafka partition per record

John O

I am consuming data from a kafka topic that has multiple partitions. I would like to keyby(record.partition). What would be the best way to get access to the partition information?

 

 

Jo

Reply | Threaded
Open this post in threaded view
|

RE: Access to kafka partition per record

John O

Found it. Using KeyedDeserializationSchema, I can get access to the partition, offset, key and value information.

 

From: John O
Sent: Monday, August 20, 2018 3:15 PM
To: user <[hidden email]>
Subject: Access to kafka partition per record

 

I am consuming data from a kafka topic that has multiple partitions. I would like to keyby(record.partition). What would be the best way to get access to the partition information?

 

 

Jo