One way/Send Only Endpoints
The equivalent to the
one way bus in Rhino Service Bus
is what we in NServiceBus call “Send only mode”.
In short you would use this in endpoints who’s only purpose is sending messages, websites are often a good example of send only endpoints.
This time we’ll take closer look at the code needed to start in send only mode.
var bus = Configure.With()
.DefaultBuilder()
.XmlSerializer()
.MsmqTransport()
.UnicastBus()
.SendOnly();
bus.Send(new TestMessage());
The only configuration needed when running in this mode is the destination of the messages you’re sending, you can do this either inline or through configuration.
A working sample can be found in the \samples folder of the NServiceBus package.
This article was written by Andreas Öhlund and the original blog post can be found
here.
|