0

Serialized Message is getting produced by a java microservice, same message i need to consume in another service written in golang
I am using sarama lib for kafka consumer in golang, I am getting message, but its distorted because of serialization by producing service
Need help to add custom deserializer to consumer for incoming message in Go.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
K.Ramakant
  • 1
  • 1
  • 4

1 Answers1

0

You can try by adding the serialization type in message header before publishing the message.

Let say you want publish a buffered from json string, you can add/set header content-type json. So when you consume the message from another service firstly read the header with key content-type, if the value is json then you use json serialization.