Created
September 10, 2013 06:39
-
-
Save benfoster/6505740 to your computer and use it in GitHub Desktop.
Subscribing to NServiceBus 3.0 events from ASP.NET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static IBus ConfigureBus() | |
{ | |
return NServiceBus.Configure.With() | |
.DefaultBuilder() | |
.XmlSerializer() | |
.MsmqTransport() | |
.IsTransactional(false) | |
.PurgeOnStartup(true) | |
.UnicastBus() | |
.LoadMessageHandlers() | |
.CreateBus() | |
.Start(() => Configure.Instance.ForInstallationOn<Windows>().Install()); | |
} | |
<!-- NServiceBus --> | |
<MessageForwardingInCaseOfFaultConfig ErrorQueue="error" /> | |
<UnicastBusConfig ForwardReceivedMessagesTo="audit"> | |
<MessageEndpointMappings> | |
<add Assembly="DocumentService.Messages.Commands" Endpoint="DocumentService.Host" /> | |
<add Assembly="DocumentService.Messages.Events" Endpoint="Foo.Web" /> | |
</MessageEndpointMappings> | |
</UnicastBusConfig> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment