Releases: ene-rs/ene-kafka
0.2.0
What's Changed
id
is now a mandatory field in the cloud event macro. It should be one of the event fields- New consumer interface! This release introduces an more intuitive consumer declaration interface for the handlers:
let consumer = kafka_consumer!(
topic = KafkaTopic {
name: "test".to_string(),
content_type: ContentType::Json
},
dlq_topic = KafkaTopic {
name: "test-dlq".to_string(),
content_type: ContentType::Json
},
consumer_group_id = "test-group",
bootstrap_servers = bootstrap_servers,
handlers = {
entity_created_event_handler: EntityCreatedEventHandler = EntityCreatedEventHandler {}
}
);
With this interface update, the implementation has been significantly simplified. Previously, an enumeration was generated for all the handlers of a consumer, and a vector was used to store each enumeration variant. This was not great, because you needed to iterate through the heap-stored vector, destructure the enumeration, and check if any variant match the event type. With this new interface, The consumer will contain a dispatcher, which has a fixed list of handlers as fields. The macro will generate a set of if
statements to check whether any handle can handle the event.
-
rdkafka
as a feature flag
As a preparation for a potentially another underlying kafka implementation,rdkafka
is now a feature flag of theene_kafka
crate. This means that when we have more implementations later, the crates user just needs to change the feature flag to the desired implementation :). For now,rdkafka
is the default feature flag -
Various bug fixes and improvements
0.1.2
0.1.1
What's Changed
- Update readme.md by @Abdullahsab3 in #3
- Update readme.md by @Abdullahsab3 in #4
- Update readme.md by @Abdullahsab3 in #5
- Update readme.md by @Abdullahsab3 in #6
- update dependencies by @Abdullahsab3 in #8
Full Changelog: 0.1.0...0.1.1
0.1.0
Initial alpha release