public void AssertIsValidForPubSub(Type messageType)
{
if (conventions.IsCommandType(messageType))
{
throw new Exception("Pub/Sub is not supported for Commands. They should be be sent direct to their logical owner.");
}
if (!conventions.IsEventType(messageType))
{
Log.Info("You are using a basic message to do pub/sub, consider implementing the more specific ICommand and IEvent interfaces to help NServiceBus to enforce messaging best practices for you.");
}
}