<commit_before>---
title: Versioning
summary: Illustrates message evolution over time using interfaces.
tags: []
redirects:
 - /nservicebus/versioning-sample.md
---

In this sample, there are two message projects: V1.Messages and V2.Messages:
 
<!-- import V1Message -->

The version 2 message schema inherits from the version 1 schema as shown below, adding another property on top of the properties in the version 1 schema.

<!-- import V2Message -->

There are two subscribers as before, but now one subscriber is subscribed to the version 1 message schema, V1Subscriber; and the other subscriber is subscribed to the version 2 message schema, V2Subscriber.

NOTE: Subscribers have a message handler for the messages from their respective versions. Yet there is a slight difference in their config files; V1Subscriber has the following in its UnicastBusConfig:

<!-- import V1SubscriberMapping -->

While V2Subscriber has this in its UnicastBusConfig:

<!-- import V2SubscriberMapping -->
<commit_msg>formatting<commit_after>---
title: Versioning
summary: Illustrates message evolution over time using interfaces.
tags: []
redirects:
 - /nservicebus/versioning-sample.md
---

In this sample, there are two message projects: `V1.Messages` and `V2.Messages`:
 
<!-- import V1Message -->

The version 2 message schema inherits from the version 1 schema as shown below, adding another property on top of the properties in the version 1 schema.

<!-- import V2Message -->

There are two subscribers as before, but now one subscriber is subscribed to the version 1 message schema, `V1Subscriber`; and the other subscriber is subscribed to the version 2 message schema, `V2Subscriber`.

NOTE: Subscribers have a message handler for the messages from their respective versions. Yet there is a slight difference in their config files; `V1Subscriber` has the following in its `UnicastBusConfig`:

<!-- import V1SubscriberMapping -->

While `V2Subscriber` has this in its `UnicastBusConfig`:

<!-- import V2SubscriberMapping -->

{'fraction_non_alphanumeric': 0.07323107372587828, 'fraction_numerical': 0.014844136566056407, 'mean_word_length': 4.479674796747967, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7193519', 'n_tokens_mistral': 541, 'n_tokens_neox': 511, 'n_words': 258}