rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

Do not throw exception in order producer demo.

Open ShannonDing opened this issue 2 years ago • 6 comments

UnsupportedEncodingException should not be throw out in main function.

public static void main(String[] args) throws UnsupportedEncodingException 

https://github.com/apache/rocketmq/blob/develop/example/src/main/java/org/apache/rocketmq/example/ordermessage/Producer.java

ShannonDing avatar Sep 20 '22 13:09 ShannonDing

Please assigned it to me, i want to try it.

alexcao2018 avatar Sep 20 '22 13:09 alexcao2018

Please assigned it to me, thanks!!

Aaron-TangCode avatar Sep 20 '22 13:09 Aaron-TangCode

Please assigned it to me, i want to try it.

welcome, pls create a PR after you fix it.

ShannonDing avatar Sep 21 '22 03:09 ShannonDing

fixed #5138.

alexcao2018 avatar Sep 21 '22 04:09 alexcao2018

Having reviewed the other code like this, I also found some issue like this, https://github.com/apache/rocketmq/blob/develop/example/src/main/java/org/apache/rocketmq/example/simple/AsyncProducer.java

alexcao2018 avatar Sep 21 '22 04:09 alexcao2018

Fixed all code in example package like this.

alexcao2018 avatar Sep 21 '22 05:09 alexcao2018

UnsupportedEncodingException should not be throw out in main function.

What is the rational behind this decision?

lizhanhui avatar Sep 23 '22 08:09 lizhanhui