What is a servicebus?
Asked Answered
H

1

20

I've read about nservicebus countless times on the net, but still don't get what a service bus is.

All I think is it is a way for very disparate systems to talk to each other? In which case, I don't see why it is any better than WCF?

I've seen the thread on here about what a service bus is but it still hasn't clicked.

Thanks

Hardship answered 30/9, 2011 at 23:53 Comment(1)
Possible duplicate of What is a servicebus and when do I need one?Deepsea
C
12

Assuming that you have read these pages http://particular.net/nservicebus and http://docs.particular.net/nservicebus/architecture/nservicebus-and-wcf you'll find that NServiceBus makes communicating with services much easier.

It wraps WCF by taking care of the poisoned and transactional elements of messaging as well as offering out of the box Pub / Sub style messaging. Benefits that NServiceBus will take care of include:

  • Long-running stateful processes Using WF on top
  • On-premise messaging
  • Client can send messages if server is offline
  • Poison message detection and dispatching
  • Poison messages re-processing
  • Subscriptions persist after restart
  • Polymorphic message dispatch
  • Polymorphic message routing
  • Message-driven unit testing
Cardie answered 1/10, 2011 at 0:9 Comment(6)
Just a small clarification, NSB doesn't wrap WCF, you use it instead of WCF. It can integrate with other systems via WCF that is hosted in the same process.Starknaked
Adam -- This is partly what's so confusing to those unfamiliar with service bus technology. Here, you're "clarifying" and saying that NSB is used instead of WCF, while the NServiceBus site itself says, "NServiceBus is NOT a replacement for RPC technologies like WCF." Clear as mud.Bipack
Buses shouldn't most of the time be used for public API-like RPC interfaces ("not a replacement for WCF"), and RPC (public API-like interfaces) shouldn't most of the time be used for distributed communication (messaging) between your systems ("it is used instead of WCF"). The confusion is happening because people's definitions of system boundaries are not the same. As a rule-of-thumb, public API's should be RPC (WCF, Sinatra, etc.) but decoupled communication between "internal" services should be through a bus with a durable queue (MSMQ, RabbitMQ, etc.).Klatt
@Cardie Those links have been outdated if you have newer links kindly update. Thanks in AdvancePostdate
@Klatt so what I have understood is that nservicebus will be replacement of msmq, rabbit mq etc... Isn't it... Please correct if wrong...Lengthwise
No, NSN is not a replacement for queue technologies. NSB is a "service bus" framework that uses queue technologies.Klatt

© 2022 - 2024 — McMap. All rights reserved.