Skip to content

Releases: BEagle1984/silverback

v4.6.2

22 Mar 14:59
07dbd27
Compare
Choose a tag to compare
  • Fix distributed background services graceful shutdown [#247]

See docs for details.

v5.0.0-beta.1

09 Mar 18:39
fd830b3
Compare
Choose a tag to compare
v5.0.0-beta.1 Pre-release
Pre-release

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 IPublisher as transient instead of scoped to allow injecting it into singleton services
  • Add CancellationToken support to the mediator
  • Improve builders for error policies
  • Support subscribers returning ValueTask
  • Support exponential delay in RetryErrorPolicy
  • Add new AddHeader, WithMessageId and WithKafkaKey overloads in ProducerEndpointConfigurationBuilder for easier and more readable configuration
  • Introduce typed endpoints registration using Consume<TMessage> and Produce<TMessage> methods (replacing AddInbound and AddOutbound), 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 BinaryMessageDeserializer according to the message type when using Consume<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 IInboundEnvelope extensions to get broker specific metadata such as GetKafkaOffset(), GetKafkaTimestamp(), GetMqttResponseTopic() and GetMqttCorrelationData()
  • Add IOutboundEnvelope extensions to set broker specific metadata such as SetKafkaKey(), SetMqttResponseTopic() and SetMqttCorrelationData()
  • Add WrapAndProduce and WrapAndProduceAsync methods to IPublisher to allow envelope enrichment (setting headers, kafka key, etc.) and dynamic routing
  • Add WrapAndProduceBatch and WrapAndProduceBatchAsync methods to IPublisher with the same capabilities of WrapAndProduce and WrapAndProduceAsync, supporting streaming, mapping and efficient batching with Kafka
  • Refactor and improve EntityFrameworkDomainEventsPublisher
  • Improve ITestingHelper to allow waiting for specific topics to be consumed
  • Add InboundEnvelopeBuilder and OutboundEnvelopeBuilder to 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 IgnoreNoMatchingSubscribersError setting to MQTT producer endpoints, to prevent throwing when no subscriber is consuming the produced message
  • Basic support for MQTT 5 request-response
  • Add ConsumerNameFilterAttribute to filter the subscribers by consumer name (replaces KafkaGroupIdFilterAttribute and Subscribers.MqttClientIdFilterAttribute)
  • Add new built-in (de-)serializers to support raw string, Stream and byte[]
  • Improve Activity handling for sequences (batch processing, chunking, etc.)
  • Upgrade to Confluent.Kafka 2.8.0
  • Upgrade to MQTTnet 5.0.1.1416

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:

  • IEventPublisher, ICommandPublisher and IQueryPublisher replaced by extension methods on IPublisher
  • 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. ISilverbackBuilder to SilverbackBuilder)
    • AddOutbound/AddInbound methods have been replaced by AddKafkaClients/AddMqttClients and Produce/Consume methods
    • BatchSettings, ChunkSettings, SequenceSettings, EncryptionSettings, etc. renamed to BatchConfiguration, ChunkConfiguration, SequenceConfiguration, EncryptionConfiguration, etc.
    • Configure method for Kafka clients replaced by configuration methods such as WithBootstrapServers, WithGroupId, WithClientId, etc.
    • IBrokerCallback and Add*BrokerCallbackHandler methods renamed to IBrokerClientCallback and Add*BrokerClientCallback
    • ... (many more changes)
  • Split the IMessageSerializer interface into IMessageSerializer and IMessageDeserializer
  • 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 the UseModel configuration method
  • Removed the whole IBroker and IBrokerCollection constructs
    • They are superseded by the IProducerCollection and IConsumerCollection interfaces, as well as the IBrokerClientCollection which grants access to all underlying broker clients
  • Changed some details in IProducer/IConsumer and their implementations
  • A lot of methods have been changed to return a ValueTask instead of a Task
  • Kafka key won't be set to a random Guid anymore but will be null if not explicitly set
  • Some changes to default settings:
    • Increased default KafkaConsumerConfiguration.MaxDegreeOfParallelism to 100
    • Increased default KafkaConsumerConfiguration.BackpressureLimit to 50
    • Changed default NewtonsoftJsonMessageDeserializer typename handling to TypeNameHandling.None to lay on the safe side
  • Several changes have been made to ITestingHelpe>, IKafkaTestingHelper, and Silverback.Testing.IMqttTestingHelper
  • Removed the AddSubscribers methods allowing to register subscribers via a base type or interface
  • ... (many more changes)

v4.6.1

06 Feb 22:12
eec5b5f
Compare
Choose a tag to compare
  • Fix message validation [#246]

See docs for details.

v4.6.0

06 Feb 22:13
Compare
Choose a tag to compare
  • Add GetOffsetsForTimestamp to KafkaConsumer
  • Allow specifying the number of partitions per topic in the mocked Kafka
  • Further improve assembly qualified name parsing for generic types

See docs for details.

v4.5.1

16 Jul 19:13
Compare
Choose a tag to compare
  • Fix assembly qualified name parsing for generic types

See docs for details.

v4.5.0

05 Jun 15:52
Compare
Choose a tag to compare

See docs for details.

v4.4.1

03 Dec 11:47
Compare
Choose a tag to compare

See docs for details.

v4.4.0

27 Nov 13:29
Compare
Choose a tag to compare
  • Allow parallel processing of MQTT messages
  • Upgrade to MQTTnet 4.3.1.873
  • Upgrade to Confluent.Kafka 2.2.0
  • Correctly set message timestamp in mocked Kafka
  • Properly handle Kafka partitions revoked event when no partitions were assigned [#214]
  • Respect IgnoreUnhandledException when batch processing [#216]

See docs for details.

v4.3.2

19 May 11:44
Compare
Choose a tag to compare
  • Fix potential message loss in OutboxWorker

See docs for details.

v4.3.1

18 May 19:32
Compare
Choose a tag to compare
  • Fix deadlock in OutboxWorker when enforceMessageOrder=true (default)

See docs for details.