You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The assembly scanner doesn't scan message assemblies that reference the recently introduced NServiceBus.MessageInterfaces assembly
Who's affected
Customers using the recently introduced NServiceBus.MessageInterfaces assembly
Root cause
The idea of message interfaces was to provide a stable package that message assemblies can reference without having to reference NServiceBus.Core. Unfortunately, the assembly scanner has not be changed to include the assemblies that reference the interface package which means effectively message assemblies that reference it will be treated as unobtrusive messages.
This has implications because it means the types have to be always loaded at runtime and any code that previously relied on messages that are marked as "NServiceBus messages" are no longer discovered during scanning and therefore not added to the message metadata registry (*), which makes it difficult to discover all message types even though effectively, you are using a well known and defined marker interface.
So switching from referencing Core to message interfaces effectively is a behavior change that also has other consequences that the customer is not aware of.
(*) The direct handled type is though because we inspect the generic type of the handler, but we already do this with unobtrusive messages too.
Symptoms
The assembly scanner doesn't scan message assemblies that reference the recently introduced
NServiceBus.MessageInterfaces
assemblyWho's affected
Customers using the recently introduced
NServiceBus.MessageInterfaces
assemblyRoot cause
The idea of message interfaces was to provide a stable package that message assemblies can reference without having to reference NServiceBus.Core. Unfortunately, the assembly scanner has not be changed to include the assemblies that reference the interface package which means effectively message assemblies that reference it will be treated as unobtrusive messages.
This has implications because it means the types have to be always loaded at runtime and any code that previously relied on messages that are marked as "NServiceBus messages" are no longer discovered during scanning and therefore not added to the message metadata registry (*), which makes it difficult to discover all message types even though effectively, you are using a well known and defined marker interface.
So switching from referencing Core to message interfaces effectively is a behavior change that also has other consequences that the customer is not aware of.
(*) The direct handled type is though because we inspect the generic type of the handler, but we already do this with unobtrusive messages too.
Backported to
The text was updated successfully, but these errors were encountered: