NServiceBus, not my love affair

Posted: 2015-02-25 in .Net

I’ve been using NServiceBus for more than 3 years now.

In principle, NServiceBus is excellent. Saga’s are a huge time saver, as is guaranteed delivery and the piece of mind they provide.
My irk with NServiceBus is that it is simply more trouble than worth.

Random Reasons:

1. Thirty updates a day. Its pretty standard that NServiceBus updates frequently. This is fine, but what is not fine is that even minor updates might have configuration changes.

2. Exceptions, if you turn on Debug -> Exceptions -> when thrown (good practice for tracing evil points) you will break about 15 times on startup, and another few times each time it checks for timeout, sagas, or just about anything else. It is hard to debug your own code if you set exception thrown on.

3. MSDTC by default. Safe by default is great in principle the problem is MSDTC and the pain it involves for setting up your computers NETBIOS. We don’t have SQL server access so these round trips can take a lot of startup time.

4. MSMQ by default. MSMQ sucks, its that simple. It is like a half baked product, take for instance that you can “Cut” a message but you can’t paste it anywhere. You can’t move message from the error queue to the queue without running a third party tool like Queue Explorer.

5. Decentralized queue, great in principle a nightmare for tracing on older projects and refactoring.

6. Features not working like they should. We have a bug involving MSDTC even though we have disabled transactions

7. performance counters… maybe no longer a bug, but we had to have them installed even though we disabled them.

8. Setup and documentation really are incomplete. Try find out how to subscribe to a published event, the http://docs.particular.net/servicematrix/getting-started-with-nservicebus-using-servicematrix-2.0-publish-subscribe link says you need to use the ServiceMatrix..
UPDATE 2015-05-21: The documentation for getting started and other configuration has improved greatly since writing this. Including publish/subscribe Thank you Particular!!

9. NServiceBus additional tools, there are a lot of tracing issues in NServiceBus, and when errors strike it is hard to trace. For this you need another tool, this is on top of the license cost. Same for the old move messages command prompt.

10. No such thing as a help message in NServiceBus, get a web.config wrong and its a weird exception (try a missing endpoint). Anything in NServiceBus is a nullreference exception or some other non helpful exception, standards don’t exist in NServiceBus.
UPDATE 2015-05-21: In 5.2 the setup exception are helpful, aka Exception message for missing persistance ” No persistence has been selected, please select your persistence by calling configuration.UsePersistence()”. Same with missing fault configuration. The exceptions now make sense!! Thank you Particular!!

11. No easy way to provide a Admin page for our IT Helpdesk (to keep eye on failed messages and what not) We ended up writing a web page that had to go and probe out to all the sites. Waste of dev time for something that should exist.

12. Unobtrusive mode, this is a god send. BUT in typical NServiceBus fashion its real pain to setup, first you have to setup both sides (why we have the end points) and second you need to check the namespace for null?!?!?!? oh a third, it doesn’t work if too well if you mix old and new. Don’t ask the docs, you need to work it out on yourself.
UPDATE 2015-05-21:
Good documentation now exist for setting up conventions http://docs.particular.net/nservicebus/messaging/unobtrusive-mode
The convention used in the example should work when migrating from old to new convention (EndsWith”Commands”) but if your naming convention is sloppy or different then also append in || typeof (ICommand).IsAssignableFrom(t)
To the conventions.DefiningCommandsAs(t => t.Namespace != null && t.Namespace == "MyNamespace" && t.Namespace.EndsWith("Commands"));

13. Did I mention configurations, in the web config you need to add multiple sections, why? and to elaborate above, major changes every major update…

So after 3 years of saying it will get better, we are now moving to Mass Transit with centralized queue RabbitMq.

And you know what 2 projects in and so far so good.

So such an advocate for so long (over the three years of use I have introduced it into 2 work places and expanded it heavily in a third) I am now ready to stand up and commit career suicide, I really, really dislike using NServiceBus. How could such a good simple concept turn into something so complex.

UPDATE 2015-05-21:
NServiceBus still has its quirks but I got to hand it to Particular, they seem to listen to the community. In the three short months since I wrote this article 3 concerns have been addressed. I wouldn’t be surprised if more are addressed in version 6.x.
I sort of hope they don’t address some of the issue in 5.x as that goes against my first point 😀

Advertisements
Comments
  1. Alex says:

    Nice article. Do you have a twitter to follow you?

  2. imorital says:

    Amen brother!

  3. Yifat says:

    We’re sorry to hear that NServiceBus didn’t meet your needs. We made a lot of improvements in version 5 to address some of the pain points you described. Should you find it of value, we would very much like to schedule a call to learn more from your experience and answer your concerns. Thank you for honestly describing the frustration you felt and for providing the detailed feedback. We are constantly working on improving our platform to answer different business scenarios such as ones you described.

  4. The community version was great but after all the new stuff it has really been painful. All the components on azure exist scheduler, queues to build an opensource version of sagas + second level retries.

  5. Reynaldo Zabala says:

    Are you still using nservice bus or did you stick with rabbitmq and masstransit

    • Choco Smith says:

      Rabbit with mastranit, rabbitmq worked great, o have reserves about mastranit but only small one.

      I’m at another company now and we use Kafka with good success

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s