You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eventmesh.apache.org by "hgaol (via GitHub)" <gi...@apache.org> on 2023/03/28 03:08:18 UTC

[GitHub] [eventmesh] hgaol commented on a diff in pull request #3524: [ISSUE #3523] fix json serialization issue when using redis

hgaol commented on code in PR #3524:
URL: https://github.com/apache/eventmesh/pull/3524#discussion_r1149977775


##########
eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/src/main/java/org/apache/eventmesh/protocol/meshmessage/resolver/tcp/TcpMessageProtocolResolver.java:
##########
@@ -77,7 +75,11 @@ public static CloudEvent buildEvent(Header header, EventMeshMessage message) thr
             .withSource(URI.create("/"))
             .withType("eventmeshmessage")
             .withSubject(topic)
-            .withData(content.getBytes(StandardCharsets.UTF_8));
+            .withData(content.getBytes(Constants.DEFAULT_CHARSET));
+
+        if (message.getHeaders().containsKey(Constants.DATA_CONTENT_TYPE)) {
+            cloudEventBuilder.withDataContentType(message.getHeaders().get(Constants.DATA_CONTENT_TYPE));
+        }
 

Review Comment:
   resolved. thanks for notification!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org