-
Notifications
You must be signed in to change notification settings - Fork 258
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
Add Default Message Mapper #3407
Conversation
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.
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.07 (9.17 -> 9.24)
src/Paramore.Brighter.Extensions.DependencyInjection/ServiceCollectionExtensions.cs
Show resolved
Hide resolved
src/Paramore.Brighter.Extensions.DependencyInjection/ServiceCollectionMessageMapperRegistry.cs
Show resolved
Hide resolved
|
||
var header = new MessageHeader(messageId: request.Id, topic: publication.Topic, messageType: messageType); | ||
|
||
var body = new MessageBody(JsonSerializer.Serialize(request, JsonSerialisationOptions.Options)); |
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.
In principle there is an async serializer. I am not sure if it actually has meaning. But we should investigate. The MS route here is to pass an enum flag to the common method and then just use sync or async code in the body, based on that flag as needed
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.
See the Flag Argument Hack here: https://learn.microsoft.com/en-us/archive/msdn-magazine/2015/july/async-programming-brownfield-async-development
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 looks really good. I can add a default Avro as well later
cb9fc8d
to
f04c96a
Compare
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.
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.07 (9.17 -> 9.24)
f04c96a
to
edcbda9
Compare
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.
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.07 (9.17 -> 9.24)
edcbda9
to
304dc98
Compare
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.
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.07 (9.17 -> 9.24)
First look into Default Message Mapper
#3355