Christian Mikkelsen
Christian Mikkelsen

Reputation: 1701

WCF vs Service Bus

We're in a tight spot at work and I need some clarity:

Basically: We can use WCF to read/write to an MSMQ and get type safety on the objects we pass.

Alternative: We could use something like NService Bus to do the exact same thing.

Now at my work we're all well versed in WCF, but none of us are well versed in using a Service Bus.

So could someone please help me with some pros/cons gains/losses for using WCF or NService Bus as right now it looks to me that it would be easier to use WCF (as long as we don't need advanced transactions etc)?

How easy would you estimate it would be to later change from WCF to NService Bus?

Kind regards

Upvotes: 2

Views: 3064

Answers (2)

Eric Farr
Eric Farr

Reputation: 2713

As others have mentioned, I wouldn't use NServiceBus as a way to simply get messages onto a queue. As Roy says, NServiceBus is not trivial to implement. It's an architectural choice, not simply an implementation choice.

However, when my team moved from a WCF solution to NServiceBus, we were very happy (after the learning curve). One of the advantages is that the design of the system makes it harder to do the wrong thing. That is to say, if something is hard to do in NServiceBus, then you are probably not thinking about the architecture the way you should (if you want an asynchronous, scalable, maintainable system).

Upvotes: 5

Roy Dictus
Roy Dictus

Reputation: 33139

If all you want to do is push messages into MSMQ, you don't need either.

NServiceBus doesn't just enqueue messages. Per NServiceBus service that you write, you can specify to which messages it subscribes and which it publishes. NServiceBus then takes care of the dispatching and delivering of the messages, using MSMQ as the transport mechanism.

NServiceBus makes it easy this way for applications to just publish and subscribe to messages without requiring knowledge of where they come from, or when a service has moved to another server.

However, NServiceBus is not as easy to use as you might think, there is not a lot of good documentation available. It thus takes some time to plough through it.

And since v2.5, you need a commercial license if you want to use it on more than one thread.

Upvotes: 5

Related Questions