NServiceBus.Transport.AzureServiceBus 6.4.1 - Minor release available

Hi everyone,

We’ve just released NServiceBus.Transport.AzureServiceBus 6.4.1.

Improvements/Features

  • #1337 Auto-provision correlation and SQL filters for both publish and subscribe when events are multiplexed on a shared topic

You can now share a single Azure Service Bus topic across multiple event types while keeping the recommended topic-per-event default. Shared-topic routing supports CorrelationFilter and SqlFilter multiplexing, plus a fallback topic for polymorphic subscriptions on base contracts and interfaces without a per-event mapping. Loading SubscribedEventToTopicsMap from appsettings.json now accepts a single topic string per event; the array form is only needed when an event maps to multiple topics, keeping the one-to-one syntax readable in application configuration.

When to upgrade

You should upgrade during your next maintenance window.

Source breaking change

To support shared-topic routing, two TopologyOptions dictionaries changed type:

  • PublishedEventToTopicsMap: Dictionary<string, string> became Dictionary<string, PublishEntry>
  • SubscribedEventToTopicsMap: Dictionary<string, HashSet<string>> became Dictionary<string, HashSet<SubscriptionEntry>>

PublishEntry and SubscriptionEntry can both be constructed from a string, but the dictionary types themselves changed, so anywhere you used string as a type argument for these maps needs updating. For example, a HashSet<string> is no longer accepted where a HashSet<SubscriptionEntry> is expected.

Before:

var opts = new TopologyOptions
{
    PublishedEventToTopicsMap = new Dictionary<string, string>(),
    SubscribedEventToTopicsMap = new Dictionary<string, HashSet<string>>(),
};

After:

var opts = new TopologyOptions
{
    PublishedEventToTopicsMap = new Dictionary<string, PublishEntry>(),
    SubscribedEventToTopicsMap = new Dictionary<string, HashSet<SubscriptionEntry>>(),
};

JSON configuration still deserializes unchanged, and the PublishTo<T>(...) and SubscribeTo<T>(...) APIs take a topic name string and handle the conversion internally, so they are unaffected. This is a source breaking change, and an exception to our release policy. We made it because the main real-world reason to touch these dictionaries directly was the hierarchy-namespace prefixing workaround, which is now supported out of the box, making a new major version disproportionate to the impact.

Where to get it

You can install NServiceBus.Transport.AzureServiceBus 6.4.1 from NuGet.

Please read our release policy for more details.

With thanks,
The team in Particular