- Added
NormalizeSchemas
configuration property to the Avro, Json and Protobuf serdes.
- Schema Registry authentication now works with passwords that contain the ':' character (luismedel).
- Added missing librdkafka internal and broker error codes to the
ErrorCode
enum.
- References librdkafka.redist 1.9.2 which includes an Apple M1 librdkafka build.
- Added ACL AdminClient operations (CreateAcls, DescribeAcls, DeleteAcls) (emasab).
- Added DeleteGroups to AdminClient (3schwartz).
- Enhanced the Avro Specific Deserializer to ignore the type namespace (sergemat).
- Improved efficiency of the statistics handler (VladimirTyrin).
- The AdminClient poll loop no longer terminates when a request results in an error (emasab).
- Upgraded Newtonsoft.Json to 13.0.1 to address a security vulnerability in 9.0.1.
There was no 1.9.1 release of the .NET Client.
- References librdkafka.redist 1.9.0. Refer to the librdkafka release notes for a complete list of changes, enhancements, fixes and upgrade considerations.
- References Apache.Avro 1.11.0. Refer to the release notes for further information (JanReimerD).
- Added support for serializing and deserializing null in Avro serdes (YairHalberstadt).
- Enhanced CachedSchemaRegistryClient to allow for user-implemented authentication schemes (henrydaly).
- Reduced memory use when producing with delivery reports disabled (TrickyCat).
- Resolved incompatibility with Apple M1 processors (dkaukov).
- No longer crashes on Alpine Linux when MUSL is installed (shurivich).
- JSON validation exception messages now properly include failing paths (drinehimer).
- Upgraded Google.Protobuf dependency to 3.15.0 (CVE-2021-22570).
- Resolved memory leak in AdminClient response handler (emasab).
- Resolved memory leak in Producer.SendOffsetsToTransaction.
- The earliest supported .NET Framework version is now 4.6.2, previously this was 4.5 (bjornbouetsmith).
- References librdkafka.redist 1.8.2. Refer to the librdkafka release notes for a complete list of changes, enhancements, fixes and upgrade considerations.
- Added the SslCaPem configuration property to specify a CA certificate using a PEM string.
- Updated
NJsonSchema
to v10.5.2.
- References librdkafka.redist 1.8.0. Refer to the librdkafka release notes for a complete list of changes, enhancements, fixes and upgrade considerations.
- Added the
UseLatestVersion
configuration property to the Protobuf, JSON Schema and Avro serdes (rayokota).
- Breaking Change: Updated the message framing format used by the Protobuf serdes (
ProtobufSerializer
andProtobufDeserializer
) to be compatible with the Java Protobuf serdes (message indices now use zigzag encoding). Note: This framing encodes schema metadata, enabling integration with Confluent Schema Registry. To disable, set theUseDeprecatedFormat
configuration property totrue
. (rayokota).
- Upgraded the bundled zlib version from 1.2.8 to 1.2.11 in the librdkafka.redist NuGet package. The updated zlib version fixes CVEs: CVE-2016-9840, CVE-2016-9841, CVE-2016-9842, CVE-2016-9843 See confluentinc/librdkafka#2934 for more information.
- References librdkafka.redist 1.7.0. Refer to the librdkafka release notes for a complete list of changes, enhancements, fixes and upgrade considerations.
- Added OAuth support to AdminClient (jerive)
- Resolved a schema caching bug (#1587) in
CachedSchemaRegistryClient.GetSchemaIdAsync
(jeremy001181). - Fixed a configuration error in the Web example (cjgalione).
- Updated
System.Net.Http
dependency to v4.3.4 (CVE-2018-8292)
- References Apache.Avro v1.10.2, which resolves an issue with large string deserialization AVRO-3005.
- References librdkafka.redist 1.6.1. Refer to the 1.6.0 and 1.6.1 release notes for more information. Headline features:
- KIP-429: Incremental rebalancing.
- KIP-447: Producer scalability for exactly once semantics.
- KIP-480: Sticky partitioner.
- KIP-22: Support for custom partitioners.
- Confluent.Kafka can now be used with Mono on Linux and MacOS. Note: Mono is not a supported runtime.
- The debian9-librdkafka.so build of librdkafka has been replaced with a more portable one: centos6-librdkafka.so (note: Debian 9 is still supported).
- Exceptions thrown by
Producer.Produce
now include an inner exception with additional context on the error (joostas). - Added
ConfigureAwait(false)
to async methods in the Avro Serdes. - Added
IsInvalid
property toHandle
class (volgunin).
- Fixed race condition in
ProtobufSerializer
(yurii-hunter).
Version 1.6.0 and 1.6.1 were not released.
- References librdkafka 1.5.3. Refer to the release notes for more information.
- References Apache.Avro v1.10.1, which adds support for enum defaults AVRO-2750.
- References librdkafka 1.5.2. Refer to the release notes for more information.
- Avro serializer now supports generic parameter
ISpecificRecord
. In this case, data is serialized according to the per-message concrete type (@ni-mi).
- Added support for OAuth Authentication via SASL/OAUTHBEARER (KIP-255) (thtp).
- References librdkafka 1.5.0 which brings many small improvements and bug fixes (and no new large features). Refer to the release notes for more information.
- Added support for Schema Registry SSL Authentication (@dinegri).
- Resolved a stack overflow issue in
Error(IntPtr error)
#1249 (@midnightriot) - References librdkafka 1.4.4. Refer to the release notes for more information.
- Subject names are now URL encoded when used in Schema Registry URLs.
- Fixed a memory leak that occured when passing a
CancellationToken
toProducer.ProduceAsync
.
- Maintenance release. Refer to the librdkafka release notes for more information.
- Fixed incorrect content-type header in Schema Registry HTTP requests (@jeremy001181).
- References librdkafka v1.4.0. Refer to the release notes for more information. Headline features:
- KIP-98: Producer support for transactions (@edenhill). This is the final piece in the puzzle required to enable exactly once stream processing (EOS) in .NET.
- KIP-345: Static consumer group membership (@rnpridgeon).
- KIP-511: Client name and version are now provided to brokers.
- Added Protobuf and JSON serdes including integration with Schema Registry.
- Switched to the official Apache Avro nuget package, which includes support for logical types, and all fixes from the Confluent fork, which has now been discontinued.
- Message headers are now exposed to serdes via
SerializationContext
(@pascalconfluent). - Added a
CancellationToken
parameter to theProduceAsync
methods. - Uncaught exceptions thrown in handler methods are now propagated to the initiating function, or in the case of error or log events, ignored. Previously, they would cause the application to terminate.
- Added a WordCount example demonstrating a streaming map-reduce application with exactly-once processing.
- Some internal improvements to the
Consmer
(thanks to @andypook). - BREAKING CHANGE:
net452
is no longer a target framework ofConfluent.SchemaRegistry
orConfluent.SchemaRegistry.Serdes
due to the switch to the official Apache Avro package which only targetsnetstandard2.0
. - Marked properties on
ConsumeResult
that simply delegate to the corresponding properties onConsumeResult.Message
as obsolete.
- Fixed an
ArgumentNullException
regression inListGroups
(thanks to @andypook).
- Added support for Subject Name Strategies to
Confluent.SchemaRegistry
(thanks to @fipil, @alexpedrero and @eroyal for their input). ConsumeResult
now throwsMessageNullException
, notNullReferenceException
when a message property is accessed but no message exists (thanks to @enzian for this change).- References librdkafka v1.3.0. Refer to the release notes for more information. Headline feature is support for fetch from follower (KIP-392).
- Deprecated properties of
SchemaRegistryConfig
with the (superfluous) prefixSchemaRegistry
. Added corresponding properties without this prefix.
- Resolved issue 993 whereby
RestService
was unable to communicate with Schema Registry hosted on a non-root path. Thanks to @jonathansant for this fix.
- References librdkafka v1.2.2 which upgrades the lz4 dependency to v1.9.2.
- References librdkafka v1.2.1 which resolves an issue that broke GSSAPI authentication on Windows.
WARNING: There is an issue with SASL GSSAPI authentication on Windows with this release. This is resolved in v1.2.1.
- References librdkafka v1.2.0. Refer to the release notes for more information. Headline feature is consumer side support for transactions.
- Added
IDictionary
overload toConfig
constructors (contribution by @AndyPook). Confluent.Kafka
,Confluent.SchemaRegistry
andConfluent.SchemaRegistry.Serdes
are now all signed, andConfluent.Kafka.StrongName
deprecated.
- Updated the librdkafka build load order so that the most featureful version is used on any given platform.
- References librdkafka v1.1.0. Refer to the release notes for more informtion. Notable improvement for Windows SSL users: You no longer need to specify a CA certificate file/directory (SslCaLocation) - librdkafka will load the CA certs by default from the Windows Root Certificate Store.
- Applied
ConfigureAwait(false)
to all internalawait
ed calls, which resolves deadlock issues in synchronization contexts with limited numbers of threads #967.
- Support for Alpine Linux.
- New LogLevelType enum and functions to convert between different log level type levels.
- Added netstandard20 as a target.
- References librdkafka 1.0.1.
1.0.0 is a major update of the API, introducing many new features and enhancements. Note: The 1.0 API is not compatible with earlier versions of the library.
Feature highlights:
- Inherits all of the new features in librdkafka v1.0.0
- General improvements to client classes:
- Strongly typed configuration.
- Construction is via builder classes:
- Allows/enforces that event handlers are specified at construction time.
- More extensible.
- Header support.
- New Message class abstraction and related changes.
- Consistency in error reporting across library (via exceptions).
- Support for fatal errors.
- Added AdminClient:
- CreateTopics, DeleteTopics, CreatePartitions, AlterConfigs, and DescribeConfigs methods.
- Moved ListGroups and GetMetadata methods from the Producer and Consumer classes to AdminClient.
- Producer specific improvements:
- New serialization interface:
- Non-blocking support for async serializers.
- Very flexible:
- e.g. can be easily extended to support header serialization.
- Capability to specify custom timestamps when producing messages.
- Message persistence status support.
- Renamed ProduceAsync variants with a callback to Produce.
- New serialization interface:
- Consumer improvements:
- A new rebalance API.
- New deserialization API analogous to the new serialization API.
- PartitionEOF notification is via ConsumeResult, not events.
- EOF notification is now disabled by default. To enable, set the EnablePartitionEof config property to true.
- Confluent Schema Registry integration
- Added support for basic authentication.
- Added GET subject versions to the cached schema registry client.
- Renamed Confluent.Kafka.Avro to Confluent.SchemaRegistry.Serdes in preparation for support for additional serialization formats.
- Moved SyncOverAsync functionality to the Confluent.Kafka.SyncOverAsync namespace.
- Marked DependentProducerBuilder as API-SUBJECT-TO-CHANGE.
- No-op handlers are no longer registered with librdkafka if corresponding handlers are not specified in client builder classes.
- Renamed AsyncAvroSerializer to AvroSerializer and AsyncAvroDeserializer to AvroDeserializer
- Added DependentAdminClientBuilder class.
- Reverted RC4 changes.
- Renamed AvroSerializer to AsyncAvroSerializer and AvroDeserializer to AsyncAvroDeserializer
- Added SyncOverAsyncSerializer and SyncOverAsyncDeserializer adapter classes.
- Added AsSyncOverAsync factory method to AsyncAvroSerializer and AsyncAvroDeserializer.
- Removed IAsyncDeserializer setter overloads from the ConsumerBuilder class.
- Renamed Producer.BeginProduce to Producer.Produce.
- Produce throws an exception if used when async serializers are configured.
- Made AdminClient, Producer, and Consumer classes internal.
- Removed
SerializationContext
from non-async serde interfaces. - Replaced
ISerializer
interface withSerializer
delegate. - Replaced
IDeserializer
interface withDeserializer
delegate.
Producer.Poll
can now be used with producer instances that are in background polling mode.- Typically use: Block for a minimal period of time following a
ErrorCode.Local_QueueFull
error.
- Typically use: Block for a minimal period of time following a
- Removed the
Confluent.Kafka.Serdes
namespace.
- Added
CompressionType
property toProducerConfig
class.
- References librdkafka.redist v1.0.0
- Moved API docs from the client classes to their respective interfaces.
- Update formatting of client API docs so they display well in Visual Studio Code intellisense.
- Added GET subject versions to the cached schema registry client.
- References librdkafka.redist 1.0.0-RC9
- supports apline linux out-of-the-box.
- fallback support (that excludes security features) for most linux distributions previously unsuppored out-of-the-box.
- fixed a dependency issue on MacOS
- A new rebalance API.
SetRebalanceHandler
has been split intoSetPartitionsAssignedHandler
andSetPartitionsRevokedHandler
.- Calling of
Assign
/Unassign
in these handlers is prohibited. - Partitions to read from / start offsets can be optionally specified manually via the return value from these handlers.
- The
Message.PersistenceStatus
property name has changed toMessage.Status
. - Moved the
GetWatermarkOffsets
andQueryWatermarkOffsets
methods from admin client to consumer. - Context is now provided to serdes via a
SerializationContext
class instance.
- Corrected an error in the
rd_kafka_event_type
method signature which was causing incompatibility with mono. - Audited exception use across the library and made changes in various places where appropriate.
- Removed unused
CancellationToken
parameters (we will add them back when implemented). - Builder classes now return interfaces, not concrete classes.
- Removed the dependency on
CompilerServices.Unsafe
which was causingProduceAsync
to hang in some scenarios. - Fixed a deadlock-on-dispose issue in
AdminClient
. - Made
Producer.ProduceAsync
async.
- Revamped producer and consumer serialization functionality.
- There are now two types of serializer and deserializer:
ISerializer<T>
/IAsyncSerializer<T>
andIDeserializer<T>
/IAsyncDeserializer<T>
.ISerializer<T>
/IDeserializer<T>
are appropriate for most use cases.IAsyncSerializer<T>
/IAsyncDeserializer<T>
are async friendly, but less performant (they returnTask
s).
- Changed the name of
Confluent.Kafka.Avro
toConfluent.SchemaRegistry.Serdes
(Schema Registry may support other serialization formats in the future). - Added an example demonstrating working with protobuf serialized data.
- There are now two types of serializer and deserializer:
Consumer
s,Producer
s andAdminClient
s are now constructed using builder classes.- This is more verbose, but provides a sufficiently flexible and future proof API for specifying serdes and other configuration information.
- All
event
s on the client classes have been replaced with correspondingSet...Handler
methods on the builder classes.- This allows (enforces) handlers are set on librdkafka initialization (which is important for some handlers, particularly the log handler).
event
s allow for more than one handler to be set, but this is often not appropriate (e.g.OnPartitionsAssigned
), and never necessary. This is no longer possible.event
s are also not async friendly (handlers can't returnTask
). The Set...Handler appropach can be extend in such a way that it is.
- Avro serdes no longer make blocking calls to
ICachedSchemaRegistryClient
- everything isawait
ed.- Note: The
Consumer
implementation still calls async deserializers synchronously because theConsumer
API is still otherwise fully synchronous.
- Note: The
- Reference librdkafka.redist 1.0.0-RC7
- Notable features: idempotent producer, sparse connections, KIP-62 (max.poll.interval.ms).
- Note: End of partition notification is now disabled by default (enable using the
EnablePartitionEof
config property).
- Removed the
Consumer.OnPartitionEOF
event in favor notifying of partition eof viaConsumeResult.IsPartitionEOF
. - Removed
ErrorEvent
class and addedIsFatal
toError
class.- The
IsFatal
flag is now set appropriately for all errors (previously it was always set tofalse
).
- The
- Added
PersistenceStatus
property toDeliveryResult
, which provides information on the persitence status of the message.
- Added
Close
method toIConsumer
interface. - Changed the name of
ProduceException.DeliveryReport
toProduceException.DeliveryResult
. - Fixed bug where enum config property couldn't be read after setting it.
- Added
SchemaRegistryBasicAuthCredentialsSource
back intoSchemaRegistryConfig
(#679). - Fixed schema registry client failover connection issue (#737).
- Improvements to librdkafka dependnecy discovery (#743).
- References librdkafka 1.0.0-PRE1. Highlights:
- Idempotent producer.
- Sparse connections (broker connections are only held open when in use).
- Fixed a memory leak in
ProduceAsync
#640 (regression from 0.11.x).
- Added an AdminClient, providing
CreateTopics
,DeleteTopics
,CreatePartitions
,DescribeConfigs
andAlterConfigs
. - Can now produce / consume message headers.
- Can now produce user defined timestamps.
- Added
IClient
,IProducer
andIConsumer
interfaces (useful for dependency injection and mocking when writing tests). - Added a
Handle
property to all clients classes:- Producers can utilize the underlying librdkafka handle from other Producers (replaces the 0.11.x
GetSerializingProducer
method on theProducer
class). AdminClient
can utilize the underlying librdkafka handle from otherAdminClient
s,Producer
s orConsumer
s.
- Producers can utilize the underlying librdkafka handle from other Producers (replaces the 0.11.x
IDeserializer
now exposes message data viaReadOnlySpan<byte>
, directly referencing librdkafka allocated memory. This results in a considerable (up to 2x) performance increase and reduced memory.- Most blocking operations now accept a
CancellationToken
parameter.- TODO: in some cases there is no backing implementation yet.
- .NET Specific configuration parameters are all specified/documented in the
ConfigPropertyNames
class.
- The
Message
class has been re-purposed and now encapsulates specifically the message payload only.ProduceAsync
/BeginProduce
now return aDeliveryReport
object andConsumer.Consume
returns aConsumeResult
object.
- The methods used to produce messages have changed:
- Methods that accept a callback are now named
BeginProduce
(notProduceAsync
), analogous to similar methods in the standard library. - Callbacks are now specified as
Action<DeliveryReportResult<TKey, TValue>>
delegates, not implementations ofIDeliveryHandler
. - The
IDeliveryHandler
interface has been deprecated. - There are two variants of
ProduceAsync
andBeginProduce
, the first takes a topic name and aMessage
. The second takes aTopicPartition
and a message.- i.e. when producing, there is now clear separation between what is produced and where it is produced to.
- The new API is more future proof.
ProduceAsync
now callsSetException
instead ofSetResult
on the returnedTask
, making error checking more convenient and less prone to developer mistakes.
- Methods that accept a callback are now named
- The feature to block
ProduceAsync
calls on local queue full has been removed (result inLocal_QueueFull
error). This should be implemented at the application layer if required. - The non-serializing
Producer
and non-deserializingConsumer
types have been removed (use generic types withbyte[]
instead), considerably reducing API surface area. - The
ISerializingProducer
interface has been removed - you can achieve the same functionality by sharing client handles instead. - The
Consumer.Poll
method and correspondingOnMessage
event have been removed. You should useConsumer.Consume
instead. - The
Consumer.OnConsumeError
has been removed. Consume errors are now exposed via aConsumeException
. - The
Consumer.Consume
method now returns aConsumeResult
object, rather than aMessage
via an out parameter. CommitAsync
has been removed (useCommit
instead).Commit
errors are reported via an exception and method return values have correspondingly changed.ListGroups
,ListGroup
,GetWatermarkOffsets
,QueryWatermarkOffsets
, andGetMetadata
have been removed fromProducer
andConsumer
and exposed only viaAdminClient
.- Added
Consumer.Close
. - Various methods that formerly returned
TopicPartitionOffsetError
/TopicPartitionError
now returnTopicPartitionOffset
/TopicPartition
and throw an exception in case of error (with aResult
property of typeTopicPartitionOffsetError
/TopicPartitionError
).
- Removed cast from
Error
tobool
. Consumer.OffsetsForTimes
if provided an empty collection will return an empty collection (not throw an exception).manualPoll
argument has been removed from theProducer
constructor and is now a configuration option.enableDeliveryReports
argument has been removed from theProducer
constructor and is now a configuration option.- Removed methods with a
millisecondsTimeout
parameter (always preferring aTimeSpan
parameter). - Added
Consumer.Consume
variants with aCancellationToken
parameter. - Added A
Producer.Flush
method variant without a timeout parameter (but with aCancellationToken
parameter that is observed). - Added the
SyslogLevel
enumeration, which is used by the log handler delegate.
- When delivery reports are disabled,
ProduceAsync
will return completedTask
s rather thanTask
s that will never complete. - Avro serializers / deserializer now handle
null
values. - Examples upgraded to target 2.1.
- Changed name of
HasError
toIsError
- Configuration options have been added to allow fine-grained control over of marshalling of values to/from librdkafka (for high performance usage).
- headers, message keys and values, timestamps and the topic name.
- Improved XML API documentation.
refer to the release notes