Skip to content

Commit a214f33

Browse files
committed
Add migration details
1 parent 4e2ba74 commit a214f33

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

nservicebus/upgrades/9.1to9.2/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ The NServiceBus.ClaimCheck library is line-level compatible with NServiceBus.Dat
2929

3030
Some care should be taken when migrating message contracts from `DataBusProperty<T>` to `ClaimCheckProperty<T>`. While NServiceBus.DataBus and NServiceBus.ClaimCheck are line-level compatible, they are not runtime compatible. An endpoint that is currently running NServiceBus.DataBus will not write properties that are `ClaimCheckProperty<T>` to the DataBus. The reverse is true of NServiceBus.ClaimCheck endpoints and `DataBusProperty<T>`. To facilitate the migration, each endpoint will need a copy of the message contract that uses the supported property type.
3131

32-
If message contracts are in their own versioned library that have been migrated to `ClamCheckProperty<T>`, it is probable NServiceBus.DataBus endpoints can remain on an older version until it can be upgraded to NServiceBus.ClaimCheck. If message contracts are not in their own versioned library, a local copy can be made to facilitate the transition. In this case it is imperative that all class names, namespaces, and property names are exactly the same to make sure the message can be properly deserialized when it is received.
32+
Changing from using `DataBusProperty<T>` to specifying conventions for the claim check properties will be the easiest way to migrate whilst maintaining runtime compatibility between the new and old versions. If this is not possible, the message contracts can be versioned separately too.
3333

34+
If message contracts are in a versioned library that has been migrated to `ClamCheckProperty<T>`, then NServiceBus.DataBus endpoints can remain on an older version of the contracts library until they can be upgraded to NServiceBus.ClaimCheck.
35+
36+
If message contracts are not in a versioned library, a local copy of the messages can be made to facilitate the transition. In this case it is imperative that all class names, namespaces, and property names are exactly the same to make sure the message can be properly deserialized when it is received.

samples/databus/file-share-databus/DataBus_1/Receiver/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Program
88
static async Task Main()
99
{
1010
Console.Title = "Receiver";
11-
var endpointConfiguration = new EndpointConfiguration("Samples.DataBus.Receiver");
11+
var endpointConfiguration = new EndpointConfiguration("Samples.ClaimCheck.Receiver");
1212
var claimCheck = endpointConfiguration.UseClaimCheck<FileShareClaimCheck, SystemJsonClaimCheckSerializer>();
1313
claimCheck.BasePath(@"..\..\..\..\storage");
1414
endpointConfiguration.UseSerialization<SystemJsonSerializer>();

samples/databus/file-share-databus/DataBus_1/Sender/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Program
88
static async Task Main()
99
{
1010
Console.Title = "Sender";
11-
var endpointConfiguration = new EndpointConfiguration("Samples.DataBus.Sender");
11+
var endpointConfiguration = new EndpointConfiguration("Samples.ClaimCheck.Sender");
1212

1313
#region ConfigureDataBus
1414

@@ -21,7 +21,7 @@ static async Task Main()
2121
endpointConfiguration.UseSerialization<SystemJsonSerializer>();
2222
endpointConfiguration.UseTransport(new LearningTransport());
2323
var endpointInstance = await Endpoint.Start(endpointConfiguration);
24-
Console.WriteLine("Press 'D' to send a databus large message");
24+
Console.WriteLine("Press 'D' to send a large message");
2525
Console.WriteLine("Press 'N' to send a normal large message exceed the size limit and throw");
2626
Console.WriteLine("Press any other key to exit");
2727

@@ -53,10 +53,10 @@ static async Task SendMessageLargePayload(IEndpointInstance endpointInstance)
5353

5454
var message = new MessageWithLargePayload
5555
{
56-
SomeProperty = "This message contains a large blob that will be sent on the data bus",
56+
SomeProperty = "This message contains a large blob that will be sent on the claim check",
5757
LargeBlob = new ClaimCheckProperty<byte[]>(new byte[1024*1024*5]) //5MB
5858
};
59-
await endpointInstance.Send("Samples.DataBus.Receiver", message);
59+
await endpointInstance.Send("Samples.ClaimCheck.Receiver", message);
6060

6161
#endregion
6262

@@ -71,7 +71,7 @@ static async Task SendMessageTooLargePayload(IEndpointInstance endpointInstance)
7171
{
7272
LargeBlob = new byte[1024*1024*5] //5MB
7373
};
74-
await endpointInstance.Send("Samples.DataBus.Receiver", message);
74+
await endpointInstance.Send("Samples.ClaimCheck.Receiver", message);
7575

7676
#endregion
7777
}

samples/databus/file-share-databus/DataBus_1/Shared/MessageWithLargePayload.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#region MessageWithLargePayload
55

6-
//the data bus is allowed to clean up transmitted properties older than the TTBR
6+
//the implementation of the claim check pattern is allowed to clean up transmitted properties older than the TTBR
77
[TimeToBeReceived("00:01:00")]
88
public class MessageWithLargePayload :
99
ICommand

0 commit comments

Comments
 (0)