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 returnTasks).
- Changed the name of
Confluent.Kafka.AvrotoConfluent.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:
Consumers,Producers andAdminClients 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
events on the client classes have been replaced with correspondingSet...Handlermethods on the builder classes.- This allows (enforces) handlers are set on librdkafka initialization (which is important for some handlers, particularly the log handler).
events 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.events 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 isawaited.- Note: The
Consumerimplementation still calls async deserializers synchronously because theConsumerAPI 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
EnablePartitionEofconfig property).
- Removed the
Consumer.OnPartitionEOFevent in favor notifying of partition eof viaConsumeResult.IsPartitionEOF. - Removed
ErrorEventclass and addedIsFataltoErrorclass.- The
IsFatalflag is now set appropriately for all errors (previously it was always set tofalse).
- The
- Added
PersistenceStatusproperty toDeliveryResult, which provides information on the persitence status of the message.
Fixes
- Added
Closemethod toIConsumerinterface. - Changed the name of
ProduceException.DeliveryReporttoProduceException.DeliveryResult. - Fixed bug where enum config property couldn't be read after setting it.
- Added
SchemaRegistryBasicAuthCredentialsSourceback intoSchemaRegistryConfig(#679). - Fixed schema registry client failover connection issue (#737).
- Improvements to librdkafka dependnecy discovery (#743).