Table of Contents

Silverback 3 Release Notes

3.8.0

Released on 2022-09-20

What's New

  • Topic name resolvers can be used to filter the messages to be produce: returning null will discard the message

Fixes

  • Fix error policies not being triggered consistently when batch consuming
  • Make IntegrationSpy fully thread-safe
  • Prevent errors when the IKafkaPartitionsRevokedCallback is invoked during application shutdown
  • Improve error handling during connection to MQTT

3.7.3

Released on 2022-07-21

Fixes

  • Support topic names with symbols (e.g. hyphens) in mocked MQTT broker

3.7.2

Released on 2022-07-01

Fixes

3.7.1

Released on 2022-06-27

Fixes

  • Improve message streams abort process to avoid first chance exceptions (e.g. during dispose)

3.7.0

Released on 2022-05-18

What's New

  • Implement basic support for Kafka transactions via KafkaTransactionalProducer (Note: this is just a first step and a more comprehensive implementation is planned for the upcoming release 4.0.0)
  • Skip chunking when processing single chunk messages

Fixes

  • Fix possible race condition in consumer pipeline

3.6.1

Released on 2022-03-24

Fixes

  • Handle race condition in BatchSequence with timeout
  • Limit consumer status history

3.6.0

Released on 2022-03-04

What's New

  • Handle IAsyncEnumerable<T> returned by the subscriber and republished the contained messages
  • Enrich Kafka messages moved by the MoveMessageErrorPolicy adding some extra headers containing some information about the source topic, partition, offset, etc. (see Default Headers)
  • Allow filters such as the KafkaGroupIdFilterAttribute or MqttClientIdFilterAttribute to be added to the subscribers at runtime via the configuration API
  • Add overload for Publish method in the error policies that forwards the exception as well as the envelope
  • Throw TimeoutException from KafkaTestingHelper and MqttTestingHelper
  • Improve MQTT connection related logs (info for successful reconnect and add broker name to log messages)
  • Support shared subscriptions in mocked MQTT broker

Fixes

  • Ensure each consumed message gets a unique traceId (when the traceparent header is not present)
  • Fix memory leak in consumer
  • Fully validate messages, including nested objects

3.5.0

Released on 2021-10-31

What's New

Fixes

  • Fix MqttConsumer reconnection issues
  • Handle edge cases related to MQTT acknowledgment timeout in MqttConsumer
  • Allow max retries specification and error policies chains with MQTT V3

3.4.0

Released on 2021-09-27

What's New

3.3.1

Released on 2021-09-03

Fixes

  • Fix AddHeaders<TMessage> and WithKafkaKey<TMessage> not being correctly invoked by all IProducer.Produce and IProducer.ProducerAsync overloads
  • Add endpoint friendly name to all logs

3.3.0

Released on 2021-08-29

What's New

Fixes

  • Invoke the Kafka partition EOF callback for all connected consumers
  • Ignore null or empty Kafka key in producer

3.2.0

Released on 2021-07-13

What's New

3.1.1

Released on 2021-06-28

Fixes

  • Invoke broker callbacks during the application shutdown to allow custom code to be run when disconnecting

3.1.0

Released on 2021-06-28

What's New

Fixes

  • Prevent possible race condition causing messages to be skipped when a RetryPolicy kicks in for messages from multiple Kafka partitions simultaneously
  • Prevent ObjectDisposedException to be thrown when Kafka events (e.g. statistics) are fired during the application shutdown
  • Prevent ObjectDisposedException to be thrown when Consumer.Dispose is called multiple times
  • Properly clear the trace context (Activity) when reconnecting the consumer to prevent the newly started consume loop to be tracked under the current message traceId
  • Fix wrong prefix in MQTT log event names

3.0.1

Released on 2021-04-04

Fixes

  • Fix IOutboxWriter lifecycle [#128]

3.0.0

Released on 2021-03-14

What's New

Fixes

  • Fix OutboxWorker not publishing custom headers [#102]

Breaking Changes

  • Refactored IPublisher
  • The chunks belonging to the same message must be contiguous (interleaved messages are at the moment not supported anymore) and in the same partition in case of Kafka
  • Removed ISubscriber interface
  • Removed BusConfigurator (moved all the configuration into the ISilverbackBuilder extension methods)
    • Replaced BusConfigurator.Connect with ISilverbackBuilder.AddEndpointsConfigurator and ISilverbackBuilder.AddEndpoints (or ISilverbackBuilder.AddKafkaEndpoints etc.) to configure the endpoints, while the broker is connected automatically at startup (see Connecting to a Message Broker)
    • Replaced BusConfigurator.Subscribe methods with ISilverbackBuilder.AddDelegateSubscriber (see Using the Message Bus)
    • Replaced BusConfigurator.HandleMessagesOfType methods with ISilverbackBuilder.HandleMessageOfType (see Using the Message Bus)
    • BusConfigurator.ScanSubscribers is not needed anymore since it gets called automatically at startup (from an IHostedService)
  • Removed IServiceCollection.Add*Subscriber, IServiceCollection.Add*Behavior, IServiceCollection.Add*BrokerBehavior, IServiceCollection.AddEndpointsConfigurator, IServiceCollection.Add*OutboundRouter extension methods, use the same methods on the ISilverbackBuilder (using IServiceCollection.ConfigureSilverback to get an instance if the ISilverbackBuilder if necessary, as shown in Setting Up Silverback)
  • Removed IBrokerOptionsBuilder.Add*BrokerBehavior, IBrokerOptionsBuilder.RegisterConfigurator, IBrokerOptionsBuilder.Add*OutboundRouter extension methods, use the same methods on the ISilverbackBuilder (using IServiceCollection.ConfigureSilverback to get an instance if the ISilverbackBuilder if necessary, as shown in Setting Up Silverback)
  • Reorganized the Silverback.Messaging.Configuration namespace moving some broker specific types under Silverback.Messaging.Configuration.Kafka, Silverback.Messaging.Configuration.Rabbit or Silverback.Messaging.Configuration.Mqtt
  • The visibility of some types has been changed to internal to favor a cleaner and clearer API where the public types are well documented and their backward compatibility is valued
  • Removed Silverback prefix from exceptions name
  • Removed the IRequest<TResponse> interface (it was implemented by both IQuery<TResult> and ICommand<TResult>)
  • Changed Impl methods suffix with Core, this affects some virtual members in the Broker and other base classes
  • IConsumer.Received event replaced by a callback delegate
  • IBroker.GetConsumer and IBrokerCollection.GetConsumer methods renamed to IBroker.AddConsumer and IBrokerCollection.AddConsumer
  • IQueueProducer and IQueueConsumer renamed to IOutboxWriter and IOutboxReader
  • The messages with a null body are by default mapped to a Tombstone/Tombstone<TMessage> (see Consuming Tombstone Messages)
  • Database:
    • Moved all entities (used with Entity Framework Core) to the Silverback.Database.Model namespace
    • Replaced InboundMessage entity with InboundLogEntry
    • Replaced OutboundMessage entity with OutboxMessage
    • Removed TemporaryMessageChunk
    • Modified schema of StoredOffset entity
  • Moved and renamed some internally used types (e.g. QueuedMessage, DbQueuedMessage, ...)
  • Complete redesign of the error policies
  • Removed IMessageIdProvider and all related logic: the Id or MessageId property will not be automatically initialized anymore and its value will not be used as identifier for the outbound message anymore
  • WithConnectionTo<>, WithConnectionToKafka, WithConnectionToRabbitMQ and WithInMemoryBroker have been removed, please use the new WithConnectionToMessageBroker and AddKafka/AddRabbit methods (see Connecting to a Message Broker)
  • Replaced the internal messages for the Kafka events such as partitions revoked/assigned, offset commit, error, log and statistics with event handler interfaces (see Broker Callbacks)
  • Deprecated Silverback.Integration.InMemory, use Silverback.Integration.Kafka.Testing, Silverback.Integration.RabbitMQ.Testing, etc. instead
  • Renamed PartitioningKeyMemberAttribute to KafkaKeyMemberAttribute
  • Silverback.Integration.Configuration has been discontinued
  • Renamed Settings property to Options in the default JsonMessageSerializer (since the switch to System.Text.Json)
  • Removed LogWithLevel method from SkipMessageErrorPolicy, use the new WithLogLevels configuration instead
  • Removed Parallel option from SubscribeAttribute
  • Renamed Offset to a more generic BrokerMessageIdentifier in the Silverback.Integration abstractions (including the envelopes)
  • Some changes to the behaviors:
  • Replaced IBroker.Connect and IBroker.Disconnect with IBroker.ConnectAsync and IBroker.DisconnectAsync
  • Some major changes to batch consuming:
  • ChunkSettings moved from Silverback.Messaging.LargeMessages namespace to Silverback.Messaging.Sequences.Chunking
  • Replaced CoreEventIds, IntegrationEventIds, KafkaEventIds and RabbitEventIds with CoreLogEvents, IntegrationLogEvents, KafkaLogEvents and RabbitLogEvents (see also Logging and Tracing)
  • Deprecated support for Entity Framework 2, only the version 3.0.1 of Silverback.Core.EntityFrameworkCore will work with Silverback 3.0.0
  • Modified message encryption for chunked messages and it will not be compatible with previous versions of Silverback (affects chunking+encryption only)