Skip to content

Instantly share code, notes, and snippets.

@pedershk
Created August 19, 2012 14:07
Show Gist options
  • Save pedershk/3395028 to your computer and use it in GitHub Desktop.
Save pedershk/3395028 to your computer and use it in GitHub Desktop.
NServicebusStartup
Bus = NServiceBus.Configure.With()
.Log4Net()
.DefaultBuilder()
.XmlSerializer()
.MsmqTransport()
.IsTransactional(true)
.PurgeOnStartup(true)
.DefineEndpointName("Hapi.AppServer_messages")
.UnicastBus()
.LoadMessageHandlers() // <-- only if handling commands/events
.CreateBus()
.Start(
() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install()
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment