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 2018/11/01 11:41:54 UTC

[GitHub] duhengforever closed pull request #479: [ISSUE #478]AsyncProducer shutdown after send async message done

duhengforever closed pull request #479: [ISSUE #478]AsyncProducer shutdown after send async message done
URL: https://github.com/apache/rocketmq/pull/479
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/example/src/main/java/org/apache/rocketmq/example/simple/AsyncProducer.java b/example/src/main/java/org/apache/rocketmq/example/simple/AsyncProducer.java
index aa15cafff..2d21685ea 100644
--- a/example/src/main/java/org/apache/rocketmq/example/simple/AsyncProducer.java
+++ b/example/src/main/java/org/apache/rocketmq/example/simple/AsyncProducer.java
@@ -32,7 +32,7 @@ public static void main(
         producer.start();
         producer.setRetryTimesWhenSendAsyncFailed(0);
 
-        for (int i = 0; i < 10000000; i++) {
+        for (int i = 0; i < 1000; i++) {
             try {
                 final int index = i;
                 Message msg = new Message("Jodie_topic_1023",
@@ -55,6 +55,7 @@ public void onException(Throwable e) {
                 e.printStackTrace();
             }
         }
+        Thread.sleep(10 * 1000L);
         producer.shutdown();
     }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services