O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning NServiceBus

Book Description

Calling all .NET developers suffering unreliable web services. This tutorial will teach you the stabilising force of Service Oriented Architecture using NServiceBus. Now you can build systems that automatically compensate for failure.

  • Replace batch jobs with a reliable process
  • Create applications that compensate for system failure
  • Build message driven system

In Detail

Queuing-based messaging system 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.

Table of Contents

  1. Learning NServiceBus
    1. Table of Contents
    2. Learning NServiceBus
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting on the IBus
      1. Why NServiceBus?
      2. Getting the code
        1. NServiceBus NuGet packages
      3. Creating a message assembly
      4. Creating a service endpoint
      5. Creating a message handler
      6. Sending a message from an MVC application
        1. Creating the MVC website
      7. Running the solution
      8. Summary
    9. 2. Messaging Patterns
      1. Commands versus events
        1. Eventual consistency
        2. Achieving consistency with messaging
      2. Events
        1. Publishing an event
        2. Subscribing to an event
      3. Message routing
      4. Summary
    10. 3. Preparing for Failure
      1. Fault tolerance and transactional processing
      2. Error queues and replay
        1. Automatic retries
        2. Replaying errors
        3. Second level retries
        4. RetryDemo
      3. Express messaging
      4. Messages that expire
      5. Auditing messages
      6. Web service integration and idempotence
      7. Summary
    11. 4. Self-Hosting
      1. Web app and custom hosting
        1. Assembly scanning
        2. Choosing an endpoint name
        3. Dependency injection
        4. Message transport
        5. Why use a different transport?
          1. ActiveMQ
          2. RabbitMQ
          3. SQL server
          4. Windows Azure
          5. Purging the queue on startup
          6. Bus options
          7. Startup
          8. Send-only endpoints
      2. Summary
    12. 5. Advanced Messaging
      1. Modifying the NServiceBus host
        1. General extension points
        2. Dependency injection
      2. Additional bus settings
        1. Message serializer
        2. Transaction settings
      3. The unobtrusive mode
      4. Message versioning
        1. Polymorphic dispatch
        2. Events as interfaces
      5. Specifying the handler order
      6. Message actions
        1. Stopping a message
        2. Deferring a message
        3. Forwarding messages
        4. Message headers
      7. Unit of work
      8. Message mutators
      9. Property encryption
      10. Transporting large payloads
      11. Exposing web services
      12. Summary
    13. 6. Sagas
      1. Long-running processes
      2. Defining a saga
      3. Finding saga data
      4. Ending a saga
      5. Dealing with time
      6. Design guidelines
        1. Business logic only
        2. Saga lifetime
        3. Saga patterns
        4. Retraining the business
      7. Unit testing
      8. Scheduling
      9. Summary
    14. 7. Administration
      1. Service installation
      2. Profiles
        1. Environmental profiles
        2. Feature profiles
        3. Customizing profiles
        4. Logging profiles
          1. Customizing the log level
      3. Managing configurations
      4. Monitoring
      5. Scalability
        1. Scaling up
        2. Scaling out
          1. Decommissioning a worker
      6. Multiple sites
      7. Managing RavenDB
      8. Virtualization
        1. Message storage
      9. Summary
    15. 8. Where to Go from Here?
      1. What we've learned
      2. What next?
    16. Index