I am wondering if the Kafka connectors leverage Kafka message keys at all?

Looking through the docs my impression is that it does not.  E.g. if I use
the connector to consume from a partitioned Kafka topic, what I will get
back is a DataStream, rather than a KeyedStream.  And if I want access to a
message's key the key must be within the message to extract it or I have to
make use of a KeyedDeserializationSchema with the connector to access the
Kafka message key and insert it into the type returned by the connector.

Similar, it would seem that you have give the Kafka product sink a
KeyedSerializationSchema, which will obtain a Kafka key and a Kafka message
from the events from a DataStream, but you can product from a KeyedStream
where the key if obtained from the stream itself.

Is this correct?

Reply via email to