3

I am receiving bytes of data onto a kafka topic and those bytes can be sent (by an application) by using plain Java Serialization or JSON serialization or protocol buffer.

So, now when my application reads those bytes from kafka topic, how does it know which Serilization technique was used, which can be: Java Serialization, JSON Serialization, Protocol Buffer.

Is there a way to check this? Does "Serialization format" differ by these different mechanisms?

Any information to understand this would be of great help.

Anton Petrov
  • 316
  • 2
  • 10
CuriousMind
  • 8,301
  • 22
  • 65
  • 134

1 Answers1

0

The serialization technique must be agreed/defined between the sender and the receiver.

It must be the contract between the two parts.

jordiburgos
  • 5,964
  • 4
  • 46
  • 80