Farfetch/kafkaflow

[Feature Request]: Split IMessageSerializer and IMessageCompressor Interfaces

filipeesch opened this issue · 0 comments

Is your request related to a problem you have?

Currently, the KafkaFlow framework uses the IMessageSerializer and IMessageCompressor interfaces to handle both serialization/deserialization and compression/decompression of messages. While this approach has served us well, it can be more flexible and maintainable to split these interfaces into four separate interfaces: ISerializer, IDeserializer, ICompressor, and IDecompressor. This change will provide a more granular and specialized approach to message handling, improving code readability and maintainability.

Describe the solution you'd like

We propose splitting the existing IMessageSerializer and IMessageCompressor interfaces into the following four interfaces:

  1. ISerializer

    • This interface will be responsible for message serialization.
  2. IDeserializer

    • This interface will handle message deserialization.
  3. ICompressor

    • This interface will be used for message compression.
  4. IDecompressor

    • This interface will handle message decompression.

Each of these interfaces will have its own specific responsibilities, making it easier to implement and customize message handling based on the requirements of individual use cases.

Are you able to help bring it to life and contribute with a Pull Request?

Yes

Additional context

No response