li-xiao-shuang commented on code in PR #4348:
URL: https://github.com/apache/rocketmq/pull/4348#discussion_r889928277
##########
example/src/main/java/org/apache/rocketmq/example/ordermessage/Producer.java:
##########
@@ -19,35 +19,38 @@
import org.apache.rocketmq.client.exception.MQBrokerException;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.client.producer.DefaultMQProducer;
-import org.apache.rocketmq.client.producer.MessageQueueSelector;
import org.apache.rocketmq.client.producer.SendResult;
import org.apache.rocketmq.common.message.Message;
-import org.apache.rocketmq.common.message.MessageQueue;
import org.apache.rocketmq.remoting.common.RemotingHelper;
import org.apache.rocketmq.remoting.exception.RemotingException;
import java.io.UnsupportedEncodingException;
-import java.util.List;
public class Producer {
+
+ public static final String PRODUCER_GROUP =
"please_rename_unique_group_name";
+ public static final String DEFAULT_NAMESRVADDR = "127.0.0.1:9876";
+ public static final String TOPIC = "TopicTest";
+ public static final int MESSAGE_COUNT = 100;
+
public static void main(String[] args) throws UnsupportedEncodingException
{
try {
- DefaultMQProducer producer = new
DefaultMQProducer("please_rename_unique_group_name");
+ DefaultMQProducer producer = new DefaultMQProducer(PRODUCER_GROUP);
+
+ // If the debugging source code can open comments, you need to set
the namesrvAddr to the address of the local namesrvAddr
+// producer.setNamesrvAddr(DEFAULT_NAMESRVADDR);
Review Comment:
This is the normal format
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]