we are using custom conventions for defining events, commands and messages.
Questions
is there a way to get the list of the all the event, messages and commands discovered by the custom conventions, i am running into an issue where a namespace which is not part of the convention, is being handled without any issues.
You can log a list of messages discovered by NServiceBus. In order to do so, you need to create a FeatureStartupTask that takes a dependency on MessageMetadataRegistry and queries it to get the list of all discovered message types.
You need to add it as a constructor argument to your feature startup task. The MessageMetadataRepository is registered in the NServiceBus DI container which is used to instantiate feature startup tasks so it will get automatically passed to your task.
public class MyFeatureStartupTask : FeatureStartupTask
{
readonly MessageMetadataRepository repository;
public MyFeatureStartupTask(MessageMetadataRepository repository)
{
this.repository = repository;
}
}