Learning NServiceBus

Learning NServiceBus
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Replace batch jobs with a reliable process
  • Create applications that compensate for system failure
  • Build message driven system

Book Details

Language : English
Paperback : 136 pages [ 235mm x 191mm ]
Release Date : August 2013
ISBN : 1782166343
ISBN 13 : 9781782166344
Author(s) : David Boike
Topics and Technologies : All Books, Enterprise Products and Platforms, Networking and Servers, Open Source

Table of Contents

Chapter 1: Getting on the IBus
Chapter 2: Messaging Patterns
Chapter 3: Preparing for Failure
Chapter 4: Self-Hosting
Chapter 5: Advanced Messaging
Chapter 6: Sagas
Chapter 7: Administration
Chapter 8: Where to Go from Here?
  • Chapter 1: Getting on the IBus
    • Why NServiceBus?
    • Getting the code
      • NServiceBus NuGet packages
    • Creating a message assembly
    • Creating a service endpoint
    • Creating a message handler
    • Sending a message from an MVC application
      • Creating the MVC website
    • Running the solution
    • Summary
    • Chapter 2: Messaging Patterns
      • Commands versus events
        • Eventual consistency
        • Achieving consistency with messaging
      • Events
        • Publishing an event
        • Subscribing to an event
      • Message routing
      • Summary
      • Chapter 3: Preparing for Failure
        • Fault tolerance and transactional processing
        • Error queues and replay
          • Automatic retries
          • Replaying errors
          • Second level retries
          • RetryDemo
        • Express messaging
        • Messages that expire
        • Auditing messages
        • Web service integration and idempotence
        • Summary
        • Chapter 4: Self-Hosting
          • Web app and custom hosting
            • Assembly scanning
            • Choosing an endpoint name
            • Dependency injection
            • Message transport
            • Why use a different transport?
              • ActiveMQ
              • RabbitMQ
              • SQL server
              • Windows Azure
              • Purging the queue on startup
              • Bus options
              • Startup
              • Send-only endpoints
          • Summary
          • Chapter 5: Advanced Messaging
            • Modifying the NServiceBus host
              • General extension points
              • Dependency injection
            • Additional bus settings
              • Message serializer
              • Transaction settings
            • The unobtrusive mode
            • Message versioning
              • Polymorphic dispatch
              • Events as interfaces
            • Specifying the handler order
            • Message actions
              • Stopping a message
              • Deferring a message
              • Forwarding messages
              • Message headers
            • Unit of work
            • Message mutators
            • Property encryption
            • Transporting large payloads
            • Exposing web services
            • Summary
            • Chapter 6: Sagas
              • Long-running processes
              • Defining a saga
              • Finding saga data
              • Ending a saga
              • Dealing with time
              • Design guidelines
                • Business logic only
                • Saga lifetime
                • Saga patterns
                • Retraining the business
              • Unit testing
              • Scheduling
              • Summary
              • Chapter 7: Administration
                • Service installation
                • Profiles
                  • Environmental profiles
                  • Feature profiles
                  • Customizing profiles
                  • Logging profiles
                    • Customizing the log level
                • Managing configurations
                • Monitoring
                • Scalability
                  • Scaling up
                  • Scaling out
                    • Decommissioning a worker
                • Multiple sites
                • Managing RavenDB
                • Virtualization
                  • Message storage
                • Summary

                  David Boike

                  David Boike is a Principal Consultant with ILM Professional Services with more than a decade of development experience in ASP.NET and related technologies and has been an avid proponent of NServiceBus since Version 2.0 in 2010. He is also an alumnus of Udi Dahan's Advanced Distributed Systems Design course. David resides in the Twin Cities with his wife and daughter. He can be found on Twitter at @DavidBoike and on his blog at http://www.make-awesome.com.

                  Code Downloads

                  Download the code and support files for this book.

                  Submit Errata

                  Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                  - 3 submitted: last submission 09 May 2014

                  Errata type: Code | Page number: 26

                  The line of code:
                  Guid String UserId{ get; set; }
                  should be:
                  Guid UserId { get; set; }

                  Errata type: Typo | Page number: 6

                  The last sentence of the third bullet:
                  A failure occurs after the email is sent, the process is retried, and the emails is sent
                  over and over until the failure no longer occurs.

                  Should be:

                  A failure
                  occurs after the email is sent, the process is retried, and the email is sent
                  over and over until the failure no longer occurs.


                  Errata type: Code | Page number: 16

                  <MessageForwardingInCaseOfFaultConfig ErrorQueue="error" />
                  <add Messages="UserService.Messages" Endpoint="UserService"


                  should be


                  <MessageForwardingInCaseOfFaultConfig ErrorQueue="error" />
                  <add Messages="UserService.Messages" Endpoint="UserService"

                  Sample chapters

                  You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                  Frequently bought together

                  Learning NServiceBus +    Haskell Data Analysis Cookbook =
                  50% Off
                  the second eBook
                  Price for both: £25.35

                  Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                  What you will learn from this book

                  • Bring reliability to web service integrations
                  • Create code that automatically compensates for failure
                  • Manage the deployment of complex software systems
                  • Create software that can scale horizontally as well as vertically

                  In Detail

                  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.

                  "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.

                  "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.


                  This is a practical tutorial containing hands-on examples for creating a messaging and SOA based service bus.

                  Who this book is for

                  This book is for .NET developers who are looking for ways to overcome problems related to buggy third party web service integrations, codebases that have grown into a big ball of mud, and batch jobs failure.

                  Code Download and Errata
                  Packt Anytime, Anywhere
                  Register Books
                  Print Upgrades
                  eBook Downloads
                  Video Support
                  Contact Us
                  Awards Voting Nominations Previous Winners
                  Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                  Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software