This is part of the NServiceBus Upgrade Guide from Version 7 to 8, which also includes the following individual upgrade guides for specific components:
Feature Details
- Upgrading the data bus from version 7 to 8
- Dependency Injection changes
- Upgrade NServiceBus downstreams from Version 7 to 8
- Upgrading message contracts from Version 7 to 8
- Upgrade NServiceBus pipeline extensions from Version 7 to 8
- Transport configuration changes
Transports
- AmazonSQS Transport Upgrade Version 5 to 6
- Azure Service Bus Transport Upgrade Version 2 to 3
- Azure Storage Queues Transport Upgrade Version 10 to 11
- MSMQ Transport Upgrade Version 1 to 2
- MSMQ Transport Upgrade Version 2 to 2.0.4
- RabbitMQ Transport Upgrade Version 7 to 8
- SQL Server Transport Upgrade Version 6 to 7
Persistence
- Cosmos DB Persistence Upgrade from 1 to 2
- NHibernate Persistence Upgrade Version 8 to 9
- RavenDB Persistence Upgrade from 7 to 8
- SQL Persistence Upgrade Version 6 to 7
Hosting
Other
If the endpoint being upgraded is not using delayed delivery or is using the SqlServerDelayedMessageStore
that ships with the MSMQ transport package, no further action is required.
Versions 2.0.0-2.0.3 of the transport include support for a custom delayed delivery message store which implements IDelayedMessageStore
. This interface contains an Initialize()
method which may be used to initialize the store when the endpoint starts. Initialize()
is called when two conditions are satisfied:
- the endpoint is configured to run installers
- the transport is configured to create queues
Version 2.0.4 preserves this behavior for backwards compatibility. If at least one of these conditions is not satisfied, Initialize()
is not called, which may cause problems in a minimal-access environment.
To ensure an endpoint can run in a minimal access environment, a new interface named IDelayedMessageStoreWithInfrastructure
has been added. This new interface extends IDelayedMessageStore
with a SetupInfrastructure()
method.
If a custom delayed delivery message store implements IDelayedMessageStoreWithInfrastructure
, Initialize()
is always called when the endpoint starts and SetupInfrastructure()
is only called if both the above conditions are satisfied.
If a custom delayed delivery message store is used in an endpoint which satisfies both the above conditions, no further action is required.
If a custom delayed delivery message store is used in an endpoint where at least one of the above conditions is not satisfied, these actions must be taken:
- Update the reference to the transport package to the latest version 2 release
- Change the custom delayed delivery message store class to implement
IDelayedMessageStoreWithInfrastructure
instead ofIDelayedMessageStore
. - Move any code that creates infrastructure from
Initialize()
toSetupInfrastructure()
.Initialize()
is always called first. IfSetupInfrastructure()
requires any references created byInitialize()
, they may be assigned to private fields on the class.