Closed asdine closed 5 years ago
@asdine How do we want to name this default formatter? It's just to reference it easily between all of us.
In Felice I called it MessageFormatterV1
(for the producer) and MessageUnformatterV1
(for the consumer). This formatter is not meant to be used in Kafka-Go though, it's just a default for Felice as an OSS lib. I suggest you don't even bother writing one for Kafka-Ex
Ack, that's the separation that forces you to have a default one.
Felice must allow consumers and producers to format messages to/from Kafka differently, depending on the topic used. In order to do that, a new concept must be introduced, that uses the Felice API to generate a Sarama message and the other way around. Let's call them Message Converters. These Message Converters can be implemented by users of the library and registered to Felice somehow. By default, Felice must provide a default message converter that:
Users must be able to select the message converter for