API Redesign / Performance / Producer
Pre-release
Pre-release
This release is generally incompatible to 0.1 due to renaming of types and movement of functionality out of KafkaClient to Consumer and (the new) Producer APIs. If you are dependent on kafka-rust be sure to have a explicit dependency on the 0.1 version if you cannot upgrade right now.
Some highlights of this release are:
- Make
KafkaClientAPI to accept references where possible (to avoid the need for clones at the caller side) - Drop
kafka::utilsfrom public view; all of the types have been moved tokafka::clientand some of them renamed to match their purpose - Avoid cloning when fetching messages (huge performance win when fetching uncompressed messages)
- Correctly consume compressed messages
- Expose messages basically as a key/value pair (in both fetching and sending APIs)
- Allow client side to control the offset commitment in
ConsumerAPI - Avoid
Consumerto clone delivered messages;Consumerno longer implementsIterator - Sending messages through
KafkaClientno longer automatically distributes them to different partitions - Introduce
ProducerAPI for sending messages to Kafka - Separate out snappy code to
snappycrate - Make
KafkaClientSendable (to allow sending it after initialization to another thread)