tsunghanjacktsai commented on code in PR #4354:
URL: https://github.com/apache/rocketmq/pull/4354#discussion_r878792650
##########
example/src/main/java/org/apache/rocketmq/example/transaction/TransactionProducer.java:
##########
@@ -26,32 +26,38 @@
import java.io.UnsupportedEncodingException;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class TransactionProducer {
+
+ 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 = "TopicTest1234";
+
+ public static final int MESSAGE_COUNT = 10;
+
public static void main(String[] args) throws MQClientException,
InterruptedException {
TransactionListener transactionListener = new
TransactionListenerImpl();
- TransactionMQProducer producer = new
TransactionMQProducer("please_rename_unique_group_name");
- ExecutorService executorService = new ThreadPoolExecutor(2, 5, 100,
TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(2000), new ThreadFactory() {
- @Override
- public Thread newThread(Runnable r) {
- Thread thread = new Thread(r);
- thread.setName("client-transaction-msg-check-thread");
- return thread;
- }
+ TransactionMQProducer producer = new
TransactionMQProducer(PRODUCER_GROUP);
+
+ // If the debugging source code can open comments, you need to set the
namesrvAddr to the address of the local namesrvAddr
Review Comment:
Sorry, it doesn't seem like you have made a change before resolving this
conversation. Could you maybe try to rephrase a bit of this instruction? That
would make this more perfect. Appreciate it.
--
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]