You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by kalpana more <km...@gmail.com> on 2018/12/05 10:53:14 UTC
Kafka Help
Dear Team,
I want to convert the c++ struct data.
I have the data which is send from tcp port to kafka using c++ ,so the data
in kafka topic is in c++ struct format.
I am not able to print that struct data on console and not able to
streaming that data using scala.
Could you help me how to solve that.
Regards,
Kalpana More
+91-7710007058.
Re: Kafka Help
Posted by "Matthias J. Sax" <ma...@confluent.io>.
You will need to write a custom deserializer that is able to convert he
`byte[]` of key and value into the desired Scala/Java object.
Interface: org.apache.kafka.common.serialization.Deserializer
You can provide your custom deserializer via config to console consumer
and KafkaConsumer in your Scala program.
https://kafka.apache.org/documentation/#consumerconfigs
-Matthias
On 12/5/18 2:53 AM, kalpana more wrote:
> Dear Team,
>
> I want to convert the c++ struct data.
>
> I have the data which is send from tcp port to kafka using c++ ,so the data
> in kafka topic is in c++ struct format.
> I am not able to print that struct data on console and not able to
> streaming that data using scala.
>
> Could you help me how to solve that.
>
>
> Regards,
> Kalpana More
> +91-7710007058.
>