Book Image

Learning NServiceBus - Second Edition

By : David Boike
Book Image

Learning NServiceBus - Second Edition

By: David Boike

Overview of this book

Table of Contents (18 chapters)
Learning NServiceBus Second Edition
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we learned how to use sagas to create long-running business processes that bring the reliability we've come to associate with message handlers to a realm previously occupied by brittle and unreliable batch jobs and scheduled tasks.

We learned how to define a saga and its data, and how to find a saga's data based on an incoming message. We also learned how to request timeouts so that a saga can wake itself up at some point in the future, and how to end a saga if required.

Then we learned the importance of restricting a saga's activities to business logic only, segregating data access and other work to other message handlers that can communicate back to the saga with reply messages. We discussed saga lifetime, the controller and observer saga patterns, and the importance of retraining our business stakeholders, who might be too used to the old way of doing things to realize what can be accomplished using messaging.

We learned how we can leverage unit testing to validate...