New Features
- 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.
Fixes
- 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).