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

Message versioning


If you've ever had to build and then maintain a web service for any significant amount of time, you would have probably dealt with the struggles that versioning those systems can have. Adding a new web method is easy enough, but what happens when the business wants to take the DoSomethingSpecial web method and add a new parameter to it? Many times this results in frustrated developers creating a DoSomethingSpecial2 method, and then old methods can never be cleaned up because it may be impossible to ensure that external clients have updated their codebase. Over time, these things build up and result in a very messy API that is very difficult for a newcomer to decipher or support.

So how do you support versioning in a message-based system? Let's take another look at an example from Chapter 2, Messaging Patterns, containing the event that announced that a user had been created. Of course, now that we are using unobtrusive mode, we have taken off the IEvent marker interface...