Releases: BEagle1984/silverback
Releases · BEagle1984/silverback
Release list
v5.3.3
v5.3.2
v5.3.1
Fixes
- Prevent null messages (tombstones) from being forwarded to regular subscribers (subscribing the message type)
- Postpone disconnect to the application stopped lifecycle event to prevent potential issues with the Kafka producer when the application is shutting down
See docs for details.
v4.7.0
What's New
- Improve outbox worker to process the entire queue in a single run
v5.3.0
What's New
- Upgrade to Confluent.Kafka 2.14.0
Fixes
- Remove the
chunk-message-idheader, which was added by mistake in v5 and introduced an unintended breaking change
See docs for details.
v5.2.2
Fixes
- Handle some potential race conditions in the batch completion and timeout handling
See docs for details.
v5.2.1
v5.2.0
What's New
- Add
WithKafkaTopicandWithMqttTopicextension methods for theInboundEnvelopeBuilder<TMessage> - Add
IIntegrationPublisheras an alternative to theWrapAndPublishextension methods onIPublisher
Fixes
- Ensure that the Kafka AdminClient is initialized with a clean configuration to prevent warnings from being logged
- Fix a race condition potentially preventing the batch sequence from completing successfully when the timeout is reached
See docs for details.
v5.1.0
What's New
- Add
IApplicationPublisheras an alternative to the extension methods onIPublisher - Upgrade to Confluent.Kafka 2.13.2
Fixes
- Correctly bind the error handler to the Kafka producer to prevent uncontrolled logging to stderr
See docs for details.
v5.0.0
Silverback 5.0.0 is the most significant update in the library’s history, built on years of user feedback and real-world experience. This release is more than just an upgrade, it’s a complete refactoring that enhances flexibility, performance, and maintainability while laying a strong foundation for future innovations.
What's New
- Clean up code and increase tests coverage
- Reduce allocations and improve performance in many places
- Register
IPublisheras transient instead of scoped to allow injecting it into singleton services - Add
CancellationTokensupport to the mediator - Improve builders for error policies
- Support subscribers returning
ValueTask - Support exponential delay in
RetryErrorPolicy - Add new
AddHeader,WithMessageIdandWithKafkaKeyoverloads inProducerEndpointConfigurationBuilderfor easier and more readable configuration - Introduce typed endpoints registration using
Consume<TMessage>andProduce<TMessage>methods (replacingAddInboundandAddOutbound), making the nested configuration more readable and type-safe - Automatically set the typed deserializer according to the message type when using
Consume<TMessage>to configure the endpoint - Automatically set the typed
BinaryMessageDeserializeraccording to the message type when usingConsume<TMessage>to configure the endpoint - Add full fluent API for Kafka and MQTT configuration
- Rewrite storage implementation from scratch and introduce new Silverback.Storage.PostgreSql, Silverback.Storage.Sqlite, Silverback.Storage.EntityFramework and Silverback.Storage.Memory packages
- Refactor transactional outbox adding support for transaction enlistment (even if not using Entity Framework) and improving performance
- Improve outbox worker reliability
- Add message filtering in producer configuration
- Improve and simplify tombstone handling
- Add
IInboundEnvelopeextensions to get broker specific metadata such asGetKafkaOffset(),GetKafkaTimestamp(),GetMqttResponseTopic()andGetMqttCorrelationData() - Add
IOutboundEnvelopeextensions to set broker specific metadata such asSetKafkaKey(),SetMqttResponseTopic()andSetMqttCorrelationData() - Add
WrapAndProduceandWrapAndProduceAsyncmethods toIPublisherto allow envelope enrichment (setting headers, kafka key, etc.) and dynamic routing - Add
WrapAndProduceBatchandWrapAndProduceBatchAsyncmethods toIPublisherwith the same capabilities ofWrapAndProduceandWrapAndProduceAsync, supporting streaming, mapping and efficient batching with Kafka - Refactor and improve
EntityFrameworkDomainEventsPublisher - Improve
ITestingHelperto allow waiting for specific topics to be consumed - Add
InboundEnvelopeBuilderandOutboundEnvelopeBuilderto testing packages to help creating test envelopes - Support Kafka cooperative sticky partition assignment strategy
- Implement transactional client-side offset storage
- Support Kafka transactions
- Add support for Confluent schema registry (Avro, Json and Protobuf), including mock for in-memory testing
- Add
IgnoreNoMatchingSubscribersErrorsetting to MQTT producer endpoints, to prevent throwing when no subscriber is consuming the produced message - Basic support for MQTT 5 request-response
- Add
ConsumerNameFilterAttributeto filter the subscribers by consumer name (replacesKafkaGroupIdFilterAttributeandSubscribers.MqttClientIdFilterAttribute) - Add new built-in (de-)serializers to support raw
string,Streamandbyte[] - Improve Activity handling for sequences (batch processing, chunking, etc.)
- Upgrade to Confluent.Kafka 2.13.1
- Upgrade to MQTTnet 5.1.0
Breaking Changes
This release includes many breaking changes, as the library underwent a significant refactoring. The following list might be incomplete but should give you an overview of the most important changes:
- Refactored the configuration model and related fluent API
- Many types, properties and methods have been renamed or modified to improve readability, consistency, and ergonomics
- Reorganized the configuration namespaces, some extension methods might have been moved to a different namespace, thus requiring a different
using. - Changed the endpoint models and most of the configuration models to records with init-only properties
- Building the endpoints directly is still supported but the strongly recommended preferred way is to use the fluent API, therefore from now on the documentation will only show that approach
- Removed all builders interfaces and exposed the actual classes directly (e.g.
ISilverbackBuildertoSilverbackBuilder) AddOutbound/AddInboundmethods have been replaced byAddKafkaClients/AddMqttClientsandProduce/ConsumemethodsBatchSettings,ChunkSettings,SequenceSettings,EncryptionSettings, etc. renamed toBatchConfiguration,ChunkConfiguration,SequenceConfiguration,EncryptionConfiguration, etc.Configuremethod for Kafka clients replaced by configuration methods such asWithBootstrapServers,WithGroupId,WithClientId, etc.IBrokerCallbackandAdd*BrokerCallbackHandlermethods renamed toIBrokerClientCallbackandAdd*BrokerClientCallback- ... (many more changes)
- Split the
IMessageSerializerinterface intoIMessageSerializerandIMessageDeserializer - Outbox and all storage dependent features have been rewritten from scratch
- Exactly once guard has been replaced by the client side offset storage
Publishing.IPublisher> itself and removed theUseModelconfiguration method - Replaced
IEventPublisher,ICommandPublisher, andIQueryPublisherwith equivalent extension methods onIPublisher- Consequently removed the
UseModelconfiguration method
- Consequently removed the
- Removed the whole
IBrokerandIBrokerCollectionconstructs- They are superseded by the
IProducerCollectionandIConsumerCollectioninterfaces, as well as theIBrokerClientCollectionwhich grants access to all underlying broker clients
- They are superseded by the
- Changed some details in
IProducer/IConsumerand their implementations - A lot of methods have been changed to return a
ValueTaskinstead of aTask - Kafka key won't be set to a random
Guidanymore but will benullif not explicitly set - Some changes to default settings:
- Increased default
KafkaConsumerConfiguration.MaxDegreeOfParallelismto 100 - Increased default
KafkaConsumerConfiguration.BackpressureLimitto 50 - Changed default
NewtonsoftJsonMessageDeserializertypename handling toTypeNameHandling.Noneto lay on the safe side
- Increased default
- Several changes have been made to
ITestingHelpe>,IKafkaTestingHelper, andSilverback.Testing.IMqttTestingHelper - Removed the
AddSubscribersmethods allowing to register subscribers via a base type or interface - ... (many more changes)
See docs for details.