Specific advantages of NServiceBus over plain RabbitMQ

Main advantages include (but are not limited to): Takes care of serialization/deserialization of messages. Provides a neat model for dispatching messages w. handlers, polymorphic dispatch, arranging handlers in a pipeline etc. Handles unit of work. Provides a neat saga implementation. Gives you a host process that can be F5-debugged as well as installed as a … Read more

NServiceBus license? [closed]

UPDATE: The licensing for NServiceBus seems to have changed for version 4.0. I can’t find anything about an Express Version. This mostly likely does not apply to that version. So I dug into this more for the 2.5 version of NServiceBus. NServiceBus has three licenses options (that apply to both code and binaries) that I … Read more

Where to raise persistence-dependent domain events – service, repository, or UI?

My solution is that you raise events in both Domain layer and service layer. Your domain: public class Order { public void ChangeStatus(OrderStatus status) { // change status this.Status = status; DomainEvent.Raise(new OrderStatusChanged { OrderId = Id, Status = status }); } public void AddNote(string note) { // add note this.Notes.Add(note) DomainEvent.Raise(new NoteCreatedForOrder { OrderId … Read more

Business rule validators and command handler in CQRS

It’s important to know that commands can be rejected after they are sent to the handler. At the very least, you could encounter a concurrency violation that cannot be detected until the aggregate root is touched. But also, the validation that can occur outside of the entity is simple validation. Not only string lengths, numeric … Read more

nServiceBus vs Mass Transit vs Rhino Service Bus vs other?

I’d recommend staying away from hand-rolled solutions as there is a bunch of somewhat difficult stuff that needs to be gotten just right – like how transactions are handled, how exceptions cause rollbacks, how to stop rolling back endlessly (poison messages), how to integrate with long-running workflows so that the state management boundaries line up, … Read more