benjaminramey / GoodlyFere.NServiceBus.EntityFramework

EntityFramework persisters for NServiceBus
Apache License 2.0
6 stars 4 forks source link

Remove subscription versioning based on assembly version #1

Open andreasohlund opened 7 years ago

andreasohlund commented 7 years ago

We've recently concluded that including the major version of the assembly containing the message contracts could lead to message loss for users not aware of this behavior. NServiceBus core 5.2.17 was released to fix this https://github.com/Particular/NServiceBus/pull/4177.

Looking at the code in the EF subscription storage I think the same problem exists here. I even thing it could be worse since MessageType.ToString() is used to get the list of message types to query for. ToString includes the full version and not just the major part.

One way to fix this would be to use MessageType.TypeName and change the query to do a "LIKE {messagetype%}" ?

I guess also storing the MessageType.TypeName would also be needed in the long run.

Does this make sense?

benjaminramey commented 7 years ago

Thanks, @andreasohlund -- yeah, this makes perfect sense. I'll get an update as soon as I can.