You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ji...@apache.org on 2020/06/05 15:14:26 UTC

[rocketmq-site] branch master updated: document(example):fix bug in simple example and add issues to release note 4.7.1

This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 620641c  document(example):fix bug in simple example and add issues to release note 4.7.1
620641c is described below

commit 620641cb4da49169c2f06a3268a69771b8e68571
Author: RongtongJin <79...@qq.com>
AuthorDate: Fri Jun 5 23:10:36 2020 +0800

    document(example):fix bug in simple example and add issues to release note 4.7.1
---
 _docs/18-simple-example.md               | 24 ++++++++++++++++--------
 _posts/2020-03-04-release-notes-4.7.0.md |  4 ++--
 _posts/2020-05-30-release-notes-4.7.1.md | 14 +++++++++++++-
 3 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/_docs/18-simple-example.md b/_docs/18-simple-example.md
index 7d3f4c2..ea71cd4 100644
--- a/_docs/18-simple-example.md
+++ b/_docs/18-simple-example.md
@@ -76,27 +76,35 @@ public class AsyncProducer {
         //Launch the instance.
         producer.start();
         producer.setRetryTimesWhenSendAsyncFailed(0);
-        for (int i = 0; i < 100; i++) {
+        
+        int messageCount = 100;
+        final CountDownLatch countDownLatch = new CountDownLatch(messageCount);
+        for (int i = 0; i < messageCount; i++) {
+            try {
                 final int index = i;
-                //Create a message instance, specifying topic, tag and message body.
-                Message msg = new Message("TopicTest",
+                Message msg = new Message("Jodie_topic_1023",
                     "TagA",
                     "OrderID188",
                     "Hello world".getBytes(RemotingHelper.DEFAULT_CHARSET));
                 producer.send(msg, new SendCallback() {
                     @Override
                     public void onSuccess(SendResult sendResult) {
-                        System.out.printf("%-10d OK %s %n", index,
-                            sendResult.getMsgId());
+                        countDownLatch.countDown();
+                        System.out.printf("%-10d OK %s %n", index, sendResult.getMsgId());
                     }
+
                     @Override
                     public void onException(Throwable e) {
+                        countDownLatch.countDown();
                         System.out.printf("%-10d Exception %s %n", index, e);
                         e.printStackTrace();
                     }
                 });
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         }
-        //Shut down once the producer instance is not longer in use.
+        countDownLatch.await(5, TimeUnit.SECONDS);
         producer.shutdown();
     }
 }
@@ -125,9 +133,9 @@ public class OnewayProducer {
             );
             //Call send message to deliver message to one of brokers.
             producer.sendOneway(msg);
-
         }
-        //Shut down once the producer instance is not longer in use.
+        //Wait for sending to complete
+        Thread.sleep(5000);        
         producer.shutdown();
     }
 }
diff --git a/_posts/2020-03-04-release-notes-4.7.0.md b/_posts/2020-03-04-release-notes-4.7.0.md
index de5a5e7..8289014 100644
--- a/_posts/2020-03-04-release-notes-4.7.0.md
+++ b/_posts/2020-03-04-release-notes-4.7.0.md
@@ -13,8 +13,8 @@ Below is a summary of the issues addressed in the 4.7.0 release of RocketMQ. For
 
 <h2> Download the 4.7.0 release</h2>
     
-* Source: [rocketmq-all-4.7.0-source-release.zip](https://www.apache.org/dyn/closer.cgi?path=rocketmq/4.7.0/rocketmq-all-4.7.0-source-release.zip) [[PGP](https://www.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-source-release.zip.asc)] [[SHA512](https://www.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-source-release.zip.sha512)]
-* Binary: [rocketmq-all-4.7.0-bin-release.zip](https://www.apache.org/dyn/closer.cgi?path=rocketmq/4.7.0/rocketmq-all-4.7.0-bin-release.zip) [[PGP](https://www.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-bin-release.zip.asc)] [[SHA512](https://www.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-bin-release.zip.sha512)]
+* Source: [rocketmq-all-4.7.0-source-release.zip](https://archive.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-source-release.zip) [[PGP](https://www.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-source-release.zip.asc)] [[SHA512](https://www.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-source-release.zip.sha512)]
+* Binary: [rocketmq-all-4.7.0-bin-release.zip](https://archive.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-bin-release.zip) [[PGP](https://www.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-bin-release.zip.asc)] [[SHA512](https://www.apache.org/dist/rocketmq/4.7.0/rocketmq-all-4.7.0-bin-release.zip.sha512)]
 
 
 ## New Feature
diff --git a/_posts/2020-05-30-release-notes-4.7.1.md b/_posts/2020-05-30-release-notes-4.7.1.md
index f4bf41a..e1ebc97 100644
--- a/_posts/2020-05-30-release-notes-4.7.1.md
+++ b/_posts/2020-05-30-release-notes-4.7.1.md
@@ -19,6 +19,10 @@ Below is a summary of the issues addressed in the 4.7.1 release of RocketMQ. For
 
 ## Improvement
 <ul>
+<li>[<a href='https://github.com/apache/rocketmq/issues/2065'>ISSUE-2065</a>] -  Fix Fastjson version for RCE problem.
+</li>
+<li>[<a href='https://github.com/apache/rocketmq/issues/2044'>ISSUE-2044</a>] -  Fix DefaultLitePullConsumerImpl NPE.
+</li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/2042'>ISSUE-2042</a>] -  Select a new namesrv when the old one removed from namesrvAddrList.
 </li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/2036'>ISSUE-2036</a>] -  Skip the null value in messageProperties2String method.
@@ -33,10 +37,16 @@ Below is a summary of the issues addressed in the 4.7.1 release of RocketMQ. For
 </li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/1992'>ISSUE-1992</a>] -  Polish the log in Broker2Client.
 </li>
+<li>[<a href='https://github.com/apache/rocketmq/issues/1988'>ISSUE-1988</a>] -  Fix the issue that can not update messageDelay correctly with mqadmin updateBrokerConfig command.
+</li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/1978'>ISSUE-1978</a>] -  Fix MessageExt#getBornHostString null pointer exception.
 </li>
+<li>[<a href='https://github.com/apache/rocketmq/issues/1976'>ISSUE-1976</a>] -  System topic should add permission checking globally.
+</li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/1950'>ISSUE-1950</a>] -  Fix DefaultMQProducer didn't shutdown completely.
 </li>
+<li>[<a href='https://github.com/apache/rocketmq/issues/1931'>ISSUE-1931</a>] -  Fix the issue of duplicate doAfterRpcHooks.
+</li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/1912'>ISSUE-1912</a>] -  Polish the commited offset logic for the lite default pull consumer.
 </li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/1906'>ISSUE-1906</a>] -  BooleanConstantExpression might lead to class loading deadlock.
@@ -75,7 +85,9 @@ Below is a summary of the issues addressed in the 4.7.1 release of RocketMQ. For
 </li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/2035'>ISSUE-2035</a>] -  Fix typo error in RequestResponseFuture. 
 </li>
-<li>[<a href='https://github.com/apache/rocketmq/issues/2043'>ISSUE-2043</a>] -  Correct the Java doc for MessageListenerOrderly.
+<li>[<a href='https://github.com/apache/rocketmq/issues/2034'>ISSUE-2034</a>] -  Correct the Java doc for MessageListenerOrderly.
+</li>
+<li>[<a href='https://github.com/apache/rocketmq/issues/2011'>ISSUE-2011</a>] -  Add english README.md document.
 </li>
 <li>[<a href='https://github.com/apache/rocketmq/issues/2006'>ISSUE-2006</a>] -  Add request-reply document.
 </li>