rebus-org / Rebus

:bus: Simple and lean service bus implementation for .NET
https://mookid.dk/category/rebus
Other
2.27k stars 354 forks source link

Make FileSystemTransport backward compatible with Rebus 5 #859

Closed jr01 closed 4 years ago

jr01 commented 4 years ago

Hi!

Rebus 6 changed the file naming in the FileSystemTransport and writes filenames that Rebus 5 doesn't process. We use that transport in CI testing and this change makes it a challenge to do a service by service migration to Rebus 6.

v6 creates files: $"rebusmessage-{now:yyyyMMdd}-{now:HHmmss}-{unitOfWorkId:N}-{index:000000}.json"); https://github.com/rebus-org/Rebus/blob/master/Rebus/Transport/FileSystem/FileSystemTransport.cs#L353

v5: reads *.rebusmessage.json https://github.com/rebus-org/Rebus/blob/release/5/Rebus/Transport/FileSystem/FileSystemTransport.cs#L91

To keep v6 backwards compatible could be just changing to $"{now:yyyyMMdd}-{now:HHmmss}-{unitOfWorkId:N}-{index:000000}.rebusmessage.json"

I tested that in one of our projects and message sent from v6 to v5 are processed, and also the other way around works! It should also be compatible with 6.0.0, so it's a non breaking change.

mookid8000 commented 4 years ago

This was fixed in Rebus 6.0.1 🙂