dfds / dafda

.NET Kafka client library
7 stars 18 forks source link

Bugfix/outbox producer serialization #96

Closed oslaksam closed 4 weeks ago

oslaksam commented 4 weeks ago

Outbox producer has incorrect serialization. This PR aims to fix it

Correct serialization: {"messageId":"579187ef-8008-45b9-9ae8-a9fc521df5a3","type":"UserPrimaryAssociateChanged","tenantId":"TEST","causationId":"c746294b-a83d-4266-bbe9-36f0461bccf0","correlationId":"7a7db530-3ce2-4e01-a2fd-0ae2a120a31e","data":{"id":"98312903-2273-4c66-abeb-f6c16892da78","primaryAssociate":0,"email":"D.KUKU@DD.COM","isDisabled":false}}

Wrong serialization that currently happens: {"messageId":"58f588b8-0fa9-42f9-ab4c-f02a23073422","type":"UserPrimaryAssociateChanged","data":"{\u0022id\u0022:\u0022ecf207c9-b471-4c6d-83ce-0b13a93cf00c\u0022,\u0022primaryAssociate\u0022:114850,\u0022email\u0022:\u0022ADMIN@DD.DD\u0022,\u0022isDisabled\u0022:false}","correlationId":"","causationId":"6abf73ef4938abcc","tenantId":"TEST","traceparent":"00-449309b89652796c36f382c583cc2ab5-4a44b34de7231936-01"}


the \u0022 char breaks serialization/deserialization
exception_stacktrace=System.Text.Json.JsonException: The JSON value could not be converted to AssociateAccessRelationsChanged.