Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make serializer configuration explicit in NServiceBus 9 #6783

Closed
DavidBoike opened this issue Jun 28, 2023 · 0 comments · Fixed by #6923
Closed

Make serializer configuration explicit in NServiceBus 9 #6783

DavidBoike opened this issue Jun 28, 2023 · 0 comments · Fixed by #6923
Milestone

Comments

@DavidBoike
Copy link
Member

DavidBoike commented Jun 28, 2023

When the System.Text.Json serializer was added in NServiceBus 8.1, a logger warning was added on startup when the XmlSerializer was selected by default because no serializer was explicitly configured.

Because no message serializer was selected, the default XmlSerializer will be used instead. In a future version of NServiceBus the XmlSerializer will no longer be the default. For better forward compatibility, either choose a different message serializer, or make the choice of XML serialization explicit using endpointConfiguration.UseSerialization()

In NServiceBus 9, the logged warning should be upgraded to an exception to force all users to specify serialization. This will clear the way for a future major version beyond NServiceBus 9 to make System.Text.Json serialization the new default.

Note that when NServiceBus 8.1 was released, an explicit serializer was added to samples tied to the "Core" component, but not to other components, because they wouldn't pull in NServiceBus 8.1 when using 8.* anyway. When rolling out the next versions of samples, all samples will need to be F5-tested to ensure that they set the serializer and don't throw on startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant