You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/03/30 11:41:18 UTC

[GitHub] [rocketmq] 6U-U9 commented on a change in pull request #4024: Replace Charset.forName("UTF-8") with StandardCharsets.UTF_8

6U-U9 commented on a change in pull request #4024:
URL: https://github.com/apache/rocketmq/pull/4024#discussion_r838442453



##########
File path: example/src/main/java/org/apache/rocketmq/example/openmessaging/SimpleProducer.java
##########
@@ -40,15 +39,15 @@ public static void main(String[] args) {
         System.out.printf("Producer startup OK%n");
 
         {
-            Message message = producer.createBytesMessage("OMS_HELLO_TOPIC", "OMS_HELLO_BODY".getBytes(Charset.forName("UTF-8")));

Review comment:
       I don't think it's necessary to specify the encode charset for message body.
   As long as one encode and decode the message with the same charset, he shall get the correct message.




-- 
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: dev-unsubscribe@rocketmq.apache.org

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