NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

v7.8: `DisableFeature<MessageDrivenSubscriptions>()` results in error "No stage connector found for stage NServiceBus.Pipeline.IOutgoingPublishContext" since version

Open ramonsmits opened this issue 3 years ago • 1 comments

When disabling the message driven subscription feature via:

endpointConfiguration.DisableFeature<MessageDrivenSubscriptions>();

The following runtime error after upgrading to Core 7.8:

Unhandled Exception: System.Exception: No stage connector found for stage NServiceBus.Pipeline.IOutgoingPublishContext

The compiler does generate the following warning:

Warning CS0618 'MessageDrivenSubscriptions' is obsolete: 'It's not recommended to disable the MessageDrivenSubscriptions feature and this option will be removed in future versions. Use 'TransportExtensions<T>.DisablePublishing()' to avoid the need for a subscription storage if this endpoint does not publish events. Will be treated as an error from version 8.0.0. Will be removed in version 8.0.0.' Sample S:\docs.particular.net\samples\msmq\simple\MsmqTransport_1\Sample\Cfg.cs 35 Active

When refactoring the code as suggested the runtime issue gets resolved.

ramonsmits avatar Nov 24 '22 10:11 ramonsmits