Skip to content

Instantly share code, notes, and snippets.

@andreasohlund
Created December 15, 2011 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreasohlund/1482280 to your computer and use it in GitHub Desktop.
Save andreasohlund/1482280 to your computer and use it in GitHub Desktop.
Configure.With()
.DefiningCommandsAs(t => t.Namespace != null && t.Namespace.EndsWith("Commands"))
.DefiningEventsAs(t => t.Namespace != null && t.Namespace.EndsWith("Events"))
.DefiningMessagesAs(t => t.Namespace != null && t.Namespace.EndsWith("Messages"))
.DefiningEncryptedPropertiesAs(p => p.Name.StartsWith("Encrypted"));
@DrivenLogic
Copy link

Hi Andreas,

This should be updated as Namespace.EndsWith("Messages") leads to a namespace clash with NSB itself.

As explined here: http://support.nservicebus.com/customer/portal/articles/910754-definingmessagesas-and-exception-when-starting-endpoint

Cheers,
Andrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment