Skip to content

Releases: BEagle1984/silverback

v5.3.3

Choose a tag to compare

@BEagle1984 BEagle1984 released this 01 Jun 20:21
c25ef05

Fixes

  • Ensure the batch sequences are completed before disconnecting (a further step in preventing the producer not connected exception during shutdown)

See docs for details.

v5.3.2

Choose a tag to compare

@BEagle1984 BEagle1984 released this 01 Jun 20:21
7bd0002

Fixes

  • Prevent deadlock in the disconnect process

See docs for details.

v5.3.1

Choose a tag to compare

@BEagle1984 BEagle1984 released this 25 May 16:08
9ba36c6

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

Choose a tag to compare

@BEagle1984 BEagle1984 released this 20 May 19:20
68013b1

What's New

  • Improve outbox worker to process the entire queue in a single run

v5.3.0

Choose a tag to compare

@BEagle1984 BEagle1984 released this 26 Apr 21:36
7eecdea

What's New

Fixes

  • Remove the chunk-message-id header, which was added by mistake in v5 and introduced an unintended breaking change

See docs for details.

v5.2.2

Choose a tag to compare

@BEagle1984 BEagle1984 released this 26 Apr 17:59
90a791c

Fixes

  • Handle some potential race conditions in the batch completion and timeout handling

See docs for details.

v5.2.1

Choose a tag to compare

@BEagle1984 BEagle1984 released this 25 Mar 23:02
c659d74

Fixes

  • Fix a potential deadlock in the batch sequence completion

See docs for details.

v5.2.0

Choose a tag to compare

@BEagle1984 BEagle1984 released this 23 Mar 20:57
93bc9a8

What's New

  • Add WithKafkaTopic and WithMqttTopic extension methods for the InboundEnvelopeBuilder<TMessage>
  • Add IIntegrationPublisher as an alternative to the WrapAndPublish extension methods on IPublisher

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

Choose a tag to compare

@BEagle1984 BEagle1984 released this 04 Mar 16:47
516d81f

What's New

  • Add IApplicationPublisher as an alternative to the extension methods on IPublisher
  • 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

Choose a tag to compare

@BEagle1984 BEagle1984 released this 22 Feb 22:16
b6c3c4e

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.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. 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
  • Replaced IEventPublisher, ICommandPublisher, and IQueryPublisher with equivalent extension methods on IPublisher
    • Consequently 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)

See docs for details.