heetch / felice

Felice is a nascent, opinionated Kafka library for Go, in Go
MIT License
20 stars 1 forks source link

Select message converter #30

Closed asdine closed 5 years ago

asdine commented 5 years ago

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

jhchabran commented 5 years ago

@asdine How do we want to name this default formatter? It's just to reference it easily between all of us.

asdine commented 5 years ago

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

jhchabran commented 5 years ago

Ack, that's the separation that forces you to have a default one.