Class FlinkKafkaProducer011
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer011
-
public class FlinkKafkaProducer011 extends Object
Compatibility class to make migration possible from the 0.11 connector to the universal one.Problem is that FlinkKafkaProducer (universal) and FlinkKafkaProducer011 have different names and they both defined static classes NextTransactionalIdHint, KafkaTransactionState and KafkaTransactionContext inside the parent classes. This is causing incompatibility problems since for example FlinkKafkaProducer011.KafkaTransactionState and FlinkKafkaProducer.KafkaTransactionState are treated as completely incompatible classes, despite being identical.
This issue is solved by using custom serialization logic: keeping a fake/dummy FlinkKafkaProducer011.*Serializer classes in the universal connector (this class), as entry points for the deserialization and converting them to FlinkKafkaProducer.*Serializer counter parts. After all serialized binary data are exactly the same in all of those cases.
For more details check FLINK-11249 and the discussion in the pull requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlinkKafkaProducer011.ContextStateSerializerstatic classFlinkKafkaProducer011.NextTransactionalIdHintstatic classFlinkKafkaProducer011.NextTransactionalIdHintSerializerstatic classFlinkKafkaProducer011.TransactionStateSerializer
-
Constructor Summary
Constructors Constructor Description FlinkKafkaProducer011()
-