NServiceBus.Storage.MongoDB 3.0.2 – Patch release available

Hi everyone,

We’ve just released NServiceBus.Storage.MongoDB 3.0.2.

Fixed bugs

  • #520 Outbox installation fails with KeyNotFoundException when the index exists but doesn’t contain the expiresAfterSeconds field

How to know if you are affected

You are affected if:

  • You are running with the outbox enabled
  • You have migrated an outbox index and during the migration the time to live (expiresAfterSeconds) was removed

Symptoms

When the endpoint is restarted, a KeyNotFoundException is thrown with a message and stack trace similar to:

Unhandled exception. System.Collections.Generic.KeyNotFoundException: Element 'expireAfterSeconds' not found.
at MongoDB.Bson.BsonDocument.GetElement(String name)
at NServiceBus.Storage.MongoDB.OutboxStorage.Setup(FeatureConfigurationContext context) in /_/src/NServiceBus.Storage.MongoDB/Outbox/OutboxStorage.cs:line 60
at NServiceBus.Features.FeatureActivator.FeatureInfo.InitializeFrom(FeatureConfigurationContext featureConfigurationContext) in /_/src/NServiceBus.Core/Features/FeatureActivator.cs:line 225
at NServiceBus.Features.FeatureActivator.ActivateFeature(FeatureInfo featureInfo, List`1 featuresToActivate, FeatureConfigurationContext featureConfigurationContext) in /_/src/NServiceBus.Core/Features/FeatureActivator.cs:line 188
at NServiceBus.Features.FeatureActivator.SetupFeatures(FeatureConfigurationContext featureConfigurationContext) in /_/src/NServiceBus.Core/Features/FeatureActivator.cs:line 54
at NServiceBus.FeatureComponent.Initalize(FeatureConfigurationContext featureConfigurationContext) in /_/src/NServiceBus.Core/Features/FeatureComponent.cs:line 29
at NServiceBus.EndpointCreator.Initialize() in /_/src/NServiceBus.Core/EndpointCreator.cs:line 59
at NServiceBus.EndpointCreator.Create(SettingsHolder settings, Configuration hostingConfiguration) in /_/src/NServiceBus.Core/EndpointCreator.cs:line 25
at NServiceBus.HostCreator.CreateWithExternallyManagedContainer(EndpointConfiguration endpointConfiguration, IConfigureComponents externalContainer) in /_/src/NServiceBus.Core/Hosting/HostCreator.cs:line 34
at NServiceBus.EndpointWithExternallyManagedContainer.Create(EndpointConfiguration configuration, IConfigureComponents configureComponents) in /_/src/NServiceBus.Core/EndpointWithExternallyManagedContainer.cs:line 20
at NServiceBus.EndpointWithExternallyManagedServiceProvider.Create(EndpointConfiguration endpointConfiguration, IServiceCollection serviceCollection) in /_/src/NServiceBus.Extensions.DependencyInjection/EndpointWithExternallyManagedServiceProvider.cs:line 21

When to upgrade

You should upgrade during the next maintenance window if you are planning to migrate outbox indexes.

Where to get it

You can install NServiceBus.Storage.MongoDB 3.0.2 from NuGet.

With thanks,
The team in Particular

Please read our release policy for more details.