2

In my project, I am going to use flink statefun kafka ingress for consuming avro-serialized records from kafka, but it seems there is no config parameter for users to specify the deserilizer for deserializing the kafka record's key, in the source code RoutableKafkaIngressDeserializer, I also noticed the key is directly converted to String from bytearray.

I tried to specify the deserializer by kafka consumer property key.deserializer, but it is not a feasible solution according to flink kafka additional properties

I found kafka deserializer can be specified through datastream API Kafka deserializer, unfortunatelly, this configuration seems not available in flink statefun kafka ingress for now.

Xin Li
  • 21
  • 1
  • Have you looked at the official documentation? You can specify your input type by implementing your custom class, and defining it in your module.yaml. Details: https://nightlies.apache.org/flink/flink-statefun-docs-release-3.2/docs/sdk/java/#types, https://nightlies.apache.org/flink/flink-statefun-docs-release-3.2/docs/modules/io/apache-kafka/ – misterbaykal Mar 11 '22 at 10:57
  • I am afraid it only works for value not the kafka ingress record key. And I found a way to deserialize the key using the Flink statefun extension module SDK – Xin Li Mar 17 '22 at 02:41

0 Answers0