Releases: kmcclellan/kafka-di
Confluent 2.2
Changes to accommodate new members on IAdminClient
in the Confluent library.
3.0 Package Compatibility
Specify that version 3.0 of this library is not compatible with version 2.2 of Confluent.Kafka
.
Confluent 2.1
Changes to accommodate new members on IClient
and IConsumer
abstractions in the Confluent library.
Full Changelog: v3.0.0...v3.0.1
Kafka Client Options (v3)
Version three of this library replaces a number of components with KafkaClientOptions
. It leverages the options pattern instead working directly with IServiceCollection
. It also introduces default binding of librdkafka
string config properties to IConfiguration
. See README/example for usage.
Upgrade guide:
The namespace for the AddKafkaClient
extension has changed from Confluent.Kafka.DependencyInjection
to Confluent.Kafka
.
Instances of ProducerConfig
, ConsumerConfig
, or AdminClientConfig
that were passed to v2 AddKafkaClient(config)
should instead be passed via the options builder:
services.AddKafkaClient().Configure(opts => opts.Configure(config));
Raw config properties in the form of string key/value pairs should be bound to the Kafka
configuration section, using a config provider such as JSON or in-memory.
Serialization types registered with the container are no longer automatically picked up by injected clients and will need passed via the options builder:
services.AddKafkaClient().Configure<ISerializer<string, string>>((opts, serializer) => opts.Serialize(serializer));
Implementations of event handler types will also need passed to the builder using delegates (KafkaClientOptions.OnError(...)
etc.).
"Typed clients" are no longer supported. If you need your application to support different configurations, I suggest exploring named options with IOptionsFactory<KafkaClientOptions>
.
v3.0.0-test3
New options-based implementation (testing)
v3.0.0-test2
New options-based implementation
v3.0.0-test
New options-based implementation
Full Changelog: v2.2.0...v3.0.0-test
v2.2.0
NuGet Package
What's Changed
- Logging improvements by @kmcclellan in #6
- Inject client builders by @kmcclellan in #7
- Inject builders (take 2) by @kmcclellan in #8
- Use scopes for config overriding by @kmcclellan in #9
- Support configuring/resolving
IAdminClient
by @kmcclellan in #10
Full Changelog: v2.1.2...v2.2.0
Service Scope Fixes
Addresses two bugs related to service scopes:
- Previously, all consumers/producers resolved by DI shared a service scope. Instances of any Kafka handlers/serializers registered as scoped would be shared by all clients. Now, each client uses a distinct scope shared by all its handlers/serializers (useful if you want two different handlers to share state).
- Previously, any disposable handlers/serializers initialized by
IKafkaFactory
would be disposed with the service provider (regardless of how many clients were created). Now, they are disposed with the clients.
Full Changelog: v2.1.1...v2.1.2
NuGet Package: https://www.nuget.org/packages/Confluent.Kafka.DependencyInjection/2.1.2
v2.1.1
What's Changed
- Logging with Invalid Handle by @pjwilliams2 in #5
New Contributors
- @pjwilliams2 made their first contribution in #5
Full Changelog: v2.1.0...v2.1.1