Ayende @ Rahien

Hi!
My name is Ayende Rahien
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 5,949 | Comments: 44,548

filter by tags archive

Setting up a Rhino Service Bus ApplicationPart II–One way bus


One really nice feature of Rhino Service Bus is the notion of the one way bus. What is that? It is a miniature implementation of the bus that supports only sending messages, not receiving them. In what world is this useful?

It turn out, it quite a few. One way bus is usually used for web apps that just send commands / events to another system, and have no need to interact with the bus other than that, or for command line tools that just send a message, etc. The advantage of the one way bus is that you don’t need your own endpoint to use it, you can just start it, send some messages, and go away.

Here is how you set it up. As usual, we start from the configuration (this assumes you have the Raven.ServiceBus.Castle nuget package):

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="rhino.esb" type="Rhino.ServiceBus.Config.BusConfigurationSection, Rhino.ServiceBus"/>
  </configSections>
  <rhino.esb>
    <messages>
      <add name="HibernatingRhinos.Orders.Backend.Messages"
           endpoint="msmq://localhost/Orders.Backend"/>
    </messages>
  </rhino.esb>
</configuration>

You might note that we don’t have any bus/endpoint configuration, only the list of message owners.

Now, the next step is just to create the actual one way bus:

var container = new WindsorContainer();
new OnewayRhinoServiceBusConfiguration()
    .UseCastleWindsor(container)
    .Configure();

var onewayBus = container.Resolve<IOnewayBus>();
onewayBus.Send(new TestMsg
{
    Name = “ayende”
});

And that is all…

More posts in "Setting up a Rhino Service Bus Application" series:

  1. (01 Dec 2011) Part II–One way bus
  2. (30 Nov 2011) Part I

Comments

Marcel Gosselin

Did you mean Rhino instead of Raven in Raven.ServiceBus.Castle?

Peter

I've been looking at the Rhino service bus and trying to get to grips with the basics first, one thing that our company is constrained by is the lack of "admin privileges" on a client machine to setup things like msmq, is it possible to swap the endpoints to be a DB queue table instead?

Ayende Rahien

Peter, You can use Rhino Queues so you don't need admin

Peter

Excellent thank you Ayende, I'll start looking into them also :o)

Thank you for your assistance and your excellent blog and support to the community!

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. The RavenDB Comic Strip (3):
    28 May 2015 - Part III – High availability & sleeping soundly
  2. Special Offer (2):
    27 May 2015 - 29% discount for all our products
  3. RavenDB Sharding (3):
    22 May 2015 - Adding a new shard to an existing cluster, splitting the shard
  4. Challenge (45):
    28 Apr 2015 - What is the meaning of this change?
  5. Interview question (2):
    30 Mar 2015 - fix the index
View all series

RECENT COMMENTS

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats