Learning NServiceBus - Second Edition
eBook - ePub

Learning NServiceBus - Second Edition

David Boike

Compartir libro
  1. 204 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Learning NServiceBus - Second Edition

David Boike

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Learning NServiceBus - Second Edition un PDF/ePUB en línea?
Sí, puedes acceder a Learning NServiceBus - Second Edition de David Boike en formato PDF o ePUB, así como a otros libros populares de Computer Science y Entreprise Applications. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781784392925

Learning NServiceBus Second Edition


Table of Contents

Learning NServiceBus Second Edition
Credits
Foreword
Early influences
Starting with MSMQ
What open source meant in those days
Clouds on the horizon
Unexpected success
Fast-forward to today
Back to David, and this book
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Instant updates on new Packt books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting on the IBus
Why use NServiceBus?
Getting the code
NServiceBus NuGet packages
Our first example
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
2. Messaging Patterns
Commands versus events
Eventual consistency
Achieving consistency with messaging
Events
Publishing an event
Subscribing to an event
Message routing
Summary
3. Preparing for Failure
Fault tolerance and transactional processing
Error queues and replay
Automatic retries
Replaying errors
Second-level retries
RetryDemo
Messages that expire
Auditing messages
Web service integration and idempotence
Summary
4. Hosting
Hosting types
NServiceBus-hosted endpoints
Self-hosted endpoints
Assembly scanning
Choosing an endpoint name
Dependency injection
Message transport
Reasons to use a different transport
MSMQ
RabbitMQ
SQL Server
Windows Azure
Persistence
In-memory persistence
NHibernate
RavenDB
Windows Azure
Polyglot persistence
Message serialization
Transactions
Purging the queue on startup
Installers
Startup
Send-only endpoints
Summary
5. Advanced Messaging
Unobtrusive mode
TimeToBeReceived attribute
Message versioning
Polymorphic dispatch
Events as interfaces
Specifying the handler order
Message actions
Stopping a message
Deferring a message
Forwarding messages
Message headers
Property encryption
Transporting large payloads
Exposing web services
Summary
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
Messages that start sagas
Retraining business stakeholders
Persistence concerns
RavenDB
NHibernate
Azure
Unit testing
Testing events as interfaces
Scheduling
Summary
7. Advanced Configuration
Extending NServiceBus
IConfigureThisEndpoint
INeedInitialization
IWantToRunWhenBusStartsAndStops
Dependency injection
Unit of work
Message mutators
The NServiceBus pipeline
Building behaviors
Ordering behaviors
Replacing behaviors
The pipeline context
Outbox
DTC 101
Life without distributed transactions
Outbox configuration
Session sharing
Summary
8. The Service Platform
ServiceControl
ServiceInsight
Endpoint Explorer
Messages
Main view
Flow Diagram
Saga
Sequence Diagram
Other tabs
ServicePulse
Endpoint activity
Failed messages
Custom checks
Getting notified
ServiceMatrix
Summary
9. Administration
Service installation
Infrastructure installers
Side-by-side installation
Profiles
Environmental profiles
Feature profiles
Customizing profiles
Logging profiles
Customizing the log level
Managing configurations
Monitoring performance
Scalability
Scaling up
Scaling out
Decommissioning a MSMQ worker
Extreme scale
Multiple sites
Virtualization
MSMQ message storage
Clustering
Transport administration
Summary
10. Where to Go from Here?
What we've learned
What next?
Index

Learning NServiceBus Second Edition

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: August 2013
Second edition: January 2015
Production reference: 1250115
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-292-5
www.packtpub.com

Credits

Author
David Boike
Reviewers
Prashant Brall
Roy Cornelissen
Hadi Eskandari
Daniel Marbach
Commissioning Editor
Dipika Gaonkar
Acquisition Editor
Larissa Pinto
Content Development Editor
Kirti Patil
Technical Editor
Chinmay S. Puranik
Copy Editors
Dipti Kapadia
Vikrant Phadke
Project Coordinator
Kranti Berde
Proofreaders
Simran Bhogal
Maria Gould
Ameesha Green
Bernadette Watkins
Indexer
Monica Ajmera Mehta
Graphics
Sheetal Aute
Abhinash Sahu
Production Coordinators
Arvindkumar Gupta
Nilesh R. Mohite
Cover Work
Arvindkumar Gupta
Nilesh R. Mohite

Foreword

Unlike many people who write a foreword for a book, I have myself not actually written a book yet, so I am probably going about this the wrong way. Also, of all the books that I have read, I have almost never read the foreword, which makes me wonder who is actually reading this.
That being said, I think that 10 years of blogging has actually prepared me very well to write this foreword, and it will end up being roughly as long as my regular blog posts.
In any case, I am extremely happy to see how well the first edition of this Learning NServiceBus book has done, and when David asked me to write the foreword for this second edition, I was more than willing to oblige.
Now that you've picked up this book, I think it's fair to assume that you have heard something about NServiceBus, maybe even downloaded it, played with it, or used it on a project or two. What you might not know is the story of how it all began and how we ended up where we are today—seeing the second edition of Learning NServiceBus being published.

Early influences

Almost 15 years ago, I was working as a developer on a gigantic command and control system developed in a language called Ada. This is what Wikipedia has to say about Ada:
"[Ada] has built-in language support for explicit concurrency, offering tasks, synchronous message passing, protected objects, and non-determinism."
These were very important attributes for a system that needed to be super reliable, highly performant, and very scalable. Little did I realize at that time how profound an effect this relatively unknown programming language would have on the rest of my career.
In my next company, a software development firm—the kind that does turnkey projects for its customers—I continued my focus on command and control systems, this time using the fairly new .NET platform from Microsoft. The thing was that many of the abilities that I'd come to rely on in Ada were (to me) curiously absent from .NET.
Like any good craftsman who has gotten used to a certain tool, I started looking around for a replacement, and when I couldn't find one, I went and made it myself.

Starting with MSMQ

Although the main message from Microsoft at the time was all about XML Web Services an...

Índice