Learning NServiceBus - Second Edition
eBook - ePub

Learning NServiceBus - Second Edition

David Boike

Condividi libro
  1. 204 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Learning NServiceBus - Second Edition

David Boike

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Learning NServiceBus - Second Edition è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Learning NServiceBus - Second Edition di David Boike in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Entreprise Applications. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

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

Indice dei contenuti