Book Image

Learning NServiceBus

By : David Boike
Book Image

Learning NServiceBus

By: David Boike

Overview of this book

<p>Web service-based systems are designed using Remote Procedure Call (RPC) techniques. This technique is effective; however, this method creates problems with scalability and reusability as fault tolerance is inherently hindered by the RPC principles. This book helps you to overcome this problem by introducing you to the principles of messaging and SOA to build scalable and reliable systems, that are easy to extend and maintain.</p> <p>"Learning NServiceBus" is your essential guide to becoming a messaging guru. The book details the process of building a software system based on the SOA principles. From sending a simple message to publishing events, this book covers everything you need to know to understand and implement an SOA-based message driven systems.</p> <p>"Learning NServiceBus" will teach you how to use publish/subscribe to create an Serivce Oriented Architecture. We will then look how to manage and extend that architecture. Through the course of the book, you will build reliable systems which will automatically compensate for failures. You will also learn to build complex yet testable business processes which will make batch processes seem outdated. By the end of the book, you will realize that SOA is much more than just web services.</p>
Table of Contents (15 chapters)

Unit testing


When we were covering saga timeouts, you may have found yourself wondering just how to test something that wasn't supposed to happen for seven days, let alone an entire year!

One option would be to temporarily set all the timeouts to something very short that you could observe before your lunch break, but this approach is problematic for several reasons. It's still hard to test this way, as you must make the timeouts long enough that you have time to be ready to observe what happens, but short enough that you don't get bored, zone out, and miss what it was you were trying to see in the first place. Then you're in for a world of hurt when you eventually forget to set those test values back before committing your code!

A much better approach is to take advantage of the NServiceBus testing framework, available through the NServiceBus.Testing NuGet package. You gain the ability to verify your long-running business processes quickly, along with all the other benefits of unit testing...