@hackage kafka-interchange0.2.0.0
Serialization for kafka wire protocol
Categories
License
BSD-3-Clause
Maintainer
amartin@layer3com.com
Links
- Documentation
- No source repository
- Security
Versions
- 0.2.0.0 Thu, 21 Mar 2024
Installation
Dependencies (21)
- base >=4.11 && <5
- bytebuild >=0.3.14
- byteslice >=0.1.1.0 && <0.3.0.0
- bytesmith >=0.3 && <0.4
- bytestring >=0.11
- castagnoli >=0.2.0.1 Show all…
Dependents (0)
kafka-interchange
This library provides serialization and deserialization for exchanges with Kafka. This takes the form of: data types, encode functions, and decode functions. This library is not a Kafka client. A Kafka client must be a much more opinionated piece of software. The purpose of this library is for Kafka clients to be built on top of it.
Module Structure
There are two module namespaces in this library: Kafka.Interchange and
Kafka.Data. Pseudoregex for modules in the Kafka.Interchange namespace:
Kafka.Interchange.{msgtype}.(Request|Response).V[0-9]+
For example:
Kafka.Interchange.Message.Request.V2
Kafka.Interchange.Message.Response.V1
Kafka.Interchange.Produce.Request.V9
The message type "Message" is special. It's the wrapper that all other message types are serialized inside of. Request modules include a encode function. Response modules include a decode function.
Some shared types are used by both requests and responses. For such types, we
use the Kafka.Data namespace. For example:
Kafka.Data.Acknowledgments
These are not versioned, and they include both encode and decode functions.