- Producers will forward traceparent and tracestate of current activity (if any) through meassage headers.
- Consumers will define traceid, spainid, parentid and tracestate in the current activity (if they appear in message headers and tracing is enabled).
OnConsumerError was not firing on serialization failure.
- Added Consumer and Producer distributed tracing. You can activate by calling the
AddReactiveKafkaInstrumentation() method on the TracerProviderBuilder instance.
- Added a new example project to demonstrate traces in action.
- Updated Confluent Kafka library from 1.9.3 to 2.3.0.
- Updated to .NET 8 (Major version will now be related to the .NET version used).
OnConsume and OnConsumeError hooks now have a ConsumerContext parameter that encapsulates all information about consumer and the processed message. As a shortcut, you can use all commit overloads directly on the ConsumerContext.
- Changed the way you choose the json serializer. Now you have 2 methods
UseNewtonsoft and UseSystemTextJson, each one with equivalent configuration class as optional. Default is Newtonsoft. Property RespectObjectContract has been removed.
- Changed the way the library chooses between System.Convert or Json Serialization, now based on typecode of the generic type.
- Configuration property to set
JsonSerializerOptions.
config.JsonSerializerOptions = new(JsonSerializerDefaults.Web);
- Ability to switch between Newtonsoft or System.Text.Json serialization providers.
config.SerializerProvider = SerializerProvider.SystemTextJson; // Newtonsoft is the default.
- Implemented
WaitForConsumersShutdown to wait for all consumers finish their jobs on a graceful shutdown (or timeout is reached: 1 minute).
- Set the
SetPartitionsRevokedHandler handle as default to turn off librdkafka's automatic partition assignment/revocation, preventing issues caused by rebalancing with auto-commit disabled.
- Added
IServiceProvider as a parameter in the configuration.
- Added exception class for specific handling of serialization errors.
- Added
KafkaConfiguration to configure options such as not awaitable workloads and serialization process respecting the object's contract.
- Added two new overloads for
AddReactiveKafkaConsumerPerPartition and AddReactiveKafkaConsumerPerQuantity.
- Possibility to set topic name at DI startup, overriding OnConsumerConfiguration in consumer class is now optional.
- Fixed bug when consumer classes used interfaces.
- Added consumer health check engine.
- Added acoupled producer in each consumer.
- Added
OnProducerBuilder in object lifecycle for the producer configuration.
OnConsumerError was not firing.