-
Notifications
You must be signed in to change notification settings - Fork 650
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
Refactored serialization feature to be aligned with transport #3310
Conversation
Bye bye |
@SzymonPobiega I'm working on the samples: Particular/docs.particular.net#1020 |
The API for registering a custom serializer is different now (requires a |
We're in a deadlock :D nice! |
Still a WIP, but @Particular/nservicebus-maintainers you can start reviewing. I might need to form a TF to take it further though. Currently will focus on doco PR and then spike another attempt to kill the message mapper. |
I think we should call YAGNI on this right now and focus on getting other things outside the door. |
25b88df
to
7ae3425
Compare
@danielmarbach then I call it non-WIP and pause here. Consider this one done in terms of code, syncing with @hmemcpy with regards to doco updates now. |
Cheecky ;) Then I like it 💃 Can you rebase |
7ae3425
to
8b96302
Compare
Aye aye, sir! |
Why should this be done for v6.0? |
@johnsimons because I was bored on Koh Samet ;-) |
@Particular/nservicebus-maintainers can you please take a look at this one? |
@@ -56,7 +57,7 @@ public DefaultServer(List<Type> typesToInclude) | |||
|
|||
if (serializer != null) | |||
{ | |||
builder.UseSerialization(Type.GetType(serializer)); | |||
builder.UseSerialization((SerializationDefinition)Activator.CreateInstance(Type.GetType(serializer, true))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ugly but I see there is no other way around because you want to deprecate
public static void UseSerialization(this NServiceBus.BusConfiguration config, System.Type serializerType)
I first thought we can repurpose the above method to:
public static void UseSerialization(this NServiceBus.BusConfiguration config, System.Type serializerDefinitionType)
But that would be strange
@SzymonPobiega this will affect the downstream serializers right? (in that case we need to line up pull for them as well?) |
Yes at least this one https://github.com/Particular/NServiceBus.Newtonsoft.Json This rest is not officially owned by us |
I really like it! |
should we consider this in scope for V6? if yes, could you please ad the expected |
context.Pipeline.Register("SerializeMessageConnector", new SerializeMessageConnector(defaultSerializer, messageMetadataRegistry), "Converts a logical message into a physical message"); | ||
|
||
context.Container.ConfigureComponent(_ => mapper, DependencyLifecycle.SingleInstance); | ||
context.Container.ConfigureComponent(_ => messageMetadataRegistry, DependencyLifecycle.SingleInstance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For backwards compat reasons should we add?
context.Container.ConfigureComponent(_ => defaultSerializer, DependencyLifecycle.SingleInstance);
// cc @Scooletz
I say yes. I'll add the label
|
…ore's message serializer and there's no way TransportDefinition can access it.
@andreasohlund @danielmarbach that downstream has already been updated: https://github.com/Particular/NServiceBus.Newtonsoft.Json/tree/update-v6 |
I had a discussion with @danielmarbach & @andreasohlund was summarized in Particular/NServiceBus.AzureStorageQueues#29. I'm going to ensure wire compatibility with tests on ASQ end and detect by |
Yupi! |
8b96302
to
aac8ad7
Compare
Rabased, squashed and changed |
See my last comment about obsoletes |
aac8ad7
to
9f98cec
Compare
@danielmarbach obsoletes added. I didn't have to rename because internal types are in the root namespace. |
9f98cec
to
522594b
Compare
Ping |
Refactored serialization feature to be aligned with transport
@danielmarbach @SzymonPobiega so this broke docs in a way that i dont know how to work around. specifically this sample http://docs.particular.net/samples/pipeline/multi-serializer/#code-walk-through-serialization-mapper can you let me know how i tweak that sample to get it working |
Since this has an associated doco PR, it fulfilled all the necessary requirements to be able to get merge. |
@danielmarbach that PR did not touch the sample in question |
If @SzymonPobiega doesn't find time until tomorrow I can have s look after On Wednesday, February 10, 2016, Simon Cropp notifications@github.com
|
Looking at it now. |
@SzymonPobiega thanks |
Here is the proposed core fix #3444 (comment) |
ConfigureSerialization
-inherited classesSerializationDefinition
Associated Doco PR
Create a PR for SC Custom Checks plugin to not use built-in json serializer@danielmarbach is already working on thatCreate a PR for SC Heartbeat plugin to not use built-in json serializerFix added torelease-1.0
branch: Particular/ServiceControl.Plugin.Nsb6.Heartbeat@93a892c