You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by vo...@apache.org on 2019/06/14 03:43:19 UTC

[rocketmq] branch develop updated (cd473fe -> 38a4e4b)

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

vongosling pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git.


    from cd473fe  [FIX] Travis-CI Java 8 building environments. (#1256)
     new 918a82a  Update issue_template.md
     new e1fa99a  Update README.md
     new 9c60f2f  [RIP-9] Commit docs Example_OpenMessaging.md (#797)
     new 21588c2  Update copyright year
     new 21b64c6  Update NOTICE
     new 38a4e4b  Update best_practice.md

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/ISSUE_TEMPLATE/issue_template.md |   2 +-
 NOTICE                                   |   4 +-
 README.md                                |   3 +-
 distribution/NOTICE-BIN                  |   4 +-
 docs/cn/best_practice.md                 |   2 +-
 docs/en/Example_OpenMessaging.md         | 118 +++++++++++++++++++++++++++++++
 6 files changed, 126 insertions(+), 7 deletions(-)
 create mode 100644 docs/en/Example_OpenMessaging.md


[rocketmq] 04/06: Update copyright year

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit 21588c29487526dcd2f6b316eff6c4e8a85c6bbf
Author: von gosling <vo...@apache.org>
AuthorDate: Mon Mar 4 15:17:29 2019 +0800

    Update copyright year
---
 distribution/NOTICE-BIN | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/distribution/NOTICE-BIN b/distribution/NOTICE-BIN
index c91dc22..c2f511f 100644
--- a/distribution/NOTICE-BIN
+++ b/distribution/NOTICE-BIN
@@ -1,5 +1,5 @@
 Apache RocketMQ
-Copyright 2016-2017 The Apache Software Foundation
+Copyright 2016-2019 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
@@ -33,4 +33,4 @@ components that this product depends on.
 
 ------
 This product has a bundle commons-lang, which includes software from the Spring Framework,
-under the Apache License 2.0 (see: StringUtils.containsWhitespace())
\ No newline at end of file
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())


[rocketmq] 01/06: Update issue_template.md

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit 918a82a3037ba1b124e461a117f29280559c774d
Author: von gosling <vo...@apache.org>
AuthorDate: Thu Jan 10 13:05:42 2019 +0800

    Update issue_template.md
---
 .github/ISSUE_TEMPLATE/issue_template.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md
index a77fb61..1c8fa94 100644
--- a/.github/ISSUE_TEMPLATE/issue_template.md
+++ b/.github/ISSUE_TEMPLATE/issue_template.md
@@ -4,7 +4,7 @@ about: Describe this issue template's purpose here.
 
 ---
 
-The issue tracker is **ONLY** used for bug report and feature request. Keep in mind, please check whether there is an existing same report before your raise a new one.
+The issue tracker is **ONLY** used for bug report(feature request need to follow [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal)). Keep in mind, please check whether there is an existing same report before your raise a new one.
 
 Alternately (especially if your communication is not a bug report), you can send mail to our [mailing lists](http://rocketmq.apache.org/about/contact/). We welcome any friendly suggestions, bug fixes, collaboration and other improvements.
 


[rocketmq] 02/06: Update README.md

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit e1fa99ae703abdcc0a22c6b504aea639a806142a
Author: von gosling <vo...@apache.org>
AuthorDate: Thu Jan 10 13:16:22 2019 +0800

    Update README.md
---
 README.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index f964f46..98d97a0 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,7 @@ It offers a variety of features:
 * Home: <https://rocketmq.apache.org>
 * Docs: <https://rocketmq.apache.org/docs/quick-start/>
 * Issues: <https://github.com/apache/rocketmq/issues>
+* Rips: <https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal>
 * Ask: <https://stackoverflow.com/questions/tagged/rocketmq>
 * Slack: <https://rocketmq-invite-automation.herokuapp.com/>
  
@@ -43,7 +44,7 @@ It offers a variety of features:
 ----------
 
 ## Contributing
-We always welcome new contributions, whether for trivial cleanups, big new features or other material rewards, more details see [here](http://rocketmq.apache.org/docs/how-to-contribute/).
+We always welcome new contributions, whether for trivial cleanups, [big new features](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal) or other material rewards, more details see [here](http://rocketmq.apache.org/docs/how-to-contribute/).
  
 ----------
 ## License


[rocketmq] 06/06: Update best_practice.md

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit 38a4e4ba61c36b06db498cb03db623b0c57a4362
Author: chenxubiao <ch...@163.com>
AuthorDate: Wed Jun 5 16:52:00 2019 +0800

    Update best_practice.md
    
    config name wrong
---
 docs/cn/best_practice.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/cn/best_practice.md b/docs/cn/best_practice.md
index 731a24b..3b64ed6 100755
--- a/docs/cn/best_practice.md
+++ b/docs/cn/best_practice.md
@@ -190,7 +190,7 @@ msgId一定是全局唯一标识符,但是实际使用中,可能会存在相
 | storePathConsumerQueue                   | $HOME/store/consumequeue/                              | 存储 consume queue 的路径                                              |
 | mapedFileSizeCommitLog     | 1024 * 1024 * 1024(1G) | commit log 的映射文件大小                                       |​ 
 | deleteWhen     | 04 | 在每天的什么时间删除已经超过文件保留时间的 commit log                                        |​ 
-| fileReserverdTime     | 72 | 以小时计算的文件保留时间                                        |​ 
+| fileReservedTime     | 72 | 以小时计算的文件保留时间                                        |​ 
 | brokerRole     | ASYNC_MASTER | SYNC_MASTER/ASYNC_MASTER/SLAVE                                        |​ 
 | flushDiskType     | ASYNC_FLUSH | SYNC_FLUSH/ASYNC_FLUSH SYNC_FLUSH 模式下的 broker 保证在收到确认生产者之前将消息刷盘。ASYNC_FLUSH 模式下的 broker 则利用刷盘一组消息的模式,可以取得更好的性能。                                       |​
 


[rocketmq] 05/06: Update NOTICE

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit 21b64c6e6fa9761da2998918afe3f26d03e62304
Author: von gosling <vo...@apache.org>
AuthorDate: Mon Mar 4 15:19:08 2019 +0800

    Update NOTICE
---
 NOTICE | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NOTICE b/NOTICE
index 703c28b..85e2dc3 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache RocketMQ
-Copyright 2016-2018 The Apache Software Foundation
+Copyright 2016-2019 The Apache Software Foundation
 
 This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
+The Apache Software Foundation (http://www.apache.org/).


[rocketmq] 03/06: [RIP-9] Commit docs Example_OpenMessaging.md (#797)

Posted by vo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit 9c60f2f96946f75f3cf194fc9b60f1d7a4771c1f
Author: xiongwu1 <11...@qq.com>
AuthorDate: Thu Feb 21 15:58:25 2019 +0800

    [RIP-9] Commit docs Example_OpenMessaging.md (#797)
    
    [RIP-9] Commit docs Example_OpenMessaging.md
---
 docs/en/Example_OpenMessaging.md | 118 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 118 insertions(+)

diff --git a/docs/en/Example_OpenMessaging.md b/docs/en/Example_OpenMessaging.md
new file mode 100644
index 0000000..026e76e
--- /dev/null
+++ b/docs/en/Example_OpenMessaging.md
@@ -0,0 +1,118 @@
+# OpenMessaging Example
+[OpenMessaging](https://openmessaging.github.io/), which includes the establishment of industry guidelines and messaging, streaming specifications to provide a common framework for finance, ecommerce, IoT and big-data area. The design principles are the cloud-oriented, simplicity, flexibility, and language independent in distributed heterogeneous environments. Conformance to these specifications will make it possible to develop a heterogeneous messaging applications across all major plat [...]
+
+RocketMQ provides a partial implementation of OpenMessaging 0.1.0-alpha, the following examples demonstrate how to access RocketMQ based on OpenMessaging.
+
+## OMSProducer
+The following example shows how to send message to RocketMQ broker in synchronous, asynchronous, or one-way transmissions.
+
+```
+public class OMSProducer {
+    public static void main(String[] args) {
+        final MessagingAccessPoint messagingAccessPoint = MessagingAccessPointFactory
+            .getMessagingAccessPoint("openmessaging:rocketmq://IP1:9876,IP2:9876/namespace");
+
+        final Producer producer = messagingAccessPoint.createProducer();
+
+        messagingAccessPoint.startup();
+        System.out.printf("MessagingAccessPoint startup OK%n");
+
+        producer.startup();
+        System.out.printf("Producer startup OK%n");
+
+        {
+            Message message = producer.createBytesMessageToTopic("OMS_HELLO_TOPIC", "OMS_HELLO_BODY".getBytes(Charset.forName("UTF-8")));
+            SendResult sendResult = producer.send(message);
+            System.out.printf("Send sync message OK, msgId: %s%n", sendResult.messageId());
+        }
+
+        {
+            final Promise<SendResult> result = producer.sendAsync(producer.createBytesMessageToTopic("OMS_HELLO_TOPIC", "OMS_HELLO_BODY".getBytes(Charset.forName("UTF-8"))));
+            result.addListener(new PromiseListener<SendResult>() {
+                @Override
+                public void operationCompleted(Promise<SendResult> promise) {
+                    System.out.printf("Send async message OK, msgId: %s%n", promise.get().messageId());
+                }
+
+                @Override
+                public void operationFailed(Promise<SendResult> promise) {
+                    System.out.printf("Send async message Failed, error: %s%n", promise.getThrowable().getMessage());
+                }
+            });
+        }
+
+        {
+            producer.sendOneway(producer.createBytesMessageToTopic("OMS_HELLO_TOPIC", "OMS_HELLO_BODY".getBytes(Charset.forName("UTF-8"))));
+            System.out.printf("Send oneway message OK%n");
+        }
+
+        producer.shutdown();
+        messagingAccessPoint.shutdown();
+    }
+}
+```
+## OMSPullConsumer
+Use OMS PullConsumer to poll messages from a specified queue.
+
+```
+public class OMSPullConsumer {
+    public static void main(String[] args) {
+        final MessagingAccessPoint messagingAccessPoint = MessagingAccessPointFactory
+            .getMessagingAccessPoint("openmessaging:rocketmq://IP1:9876,IP2:9876/namespace");
+
+        final PullConsumer consumer = messagingAccessPoint.createPullConsumer("OMS_HELLO_TOPIC",
+            OMS.newKeyValue().put(NonStandardKeys.CONSUMER_GROUP, "OMS_CONSUMER"));
+
+        messagingAccessPoint.startup();
+        System.out.printf("MessagingAccessPoint startup OK%n");
+        
+        consumer.startup();
+        System.out.printf("Consumer startup OK%n");
+
+        Message message = consumer.poll();
+        if (message != null) {
+            String msgId = message.headers().getString(MessageHeader.MESSAGE_ID);
+            System.out.printf("Received one message: %s%n", msgId);
+            consumer.ack(msgId);
+        }
+
+        consumer.shutdown();
+        messagingAccessPoint.shutdown();
+    }
+}
+
+```
+## OMSPushConsumer
+Attaches OMS PushConsumer to a specified queue and consumes messages by MessageListener
+
+```
+public class OMSPushConsumer {
+    public static void main(String[] args) {
+        final MessagingAccessPoint messagingAccessPoint = MessagingAccessPointFactory
+            .getMessagingAccessPoint("openmessaging:rocketmq://IP1:9876,IP2:9876/namespace");
+
+        final PushConsumer consumer = messagingAccessPoint.
+            createPushConsumer(OMS.newKeyValue().put(NonStandardKeys.CONSUMER_GROUP, "OMS_CONSUMER"));
+
+        messagingAccessPoint.startup();
+        System.out.printf("MessagingAccessPoint startup OK%n");
+
+        Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
+            @Override
+            public void run() {
+                consumer.shutdown();
+                messagingAccessPoint.shutdown();
+            }
+        }));
+        
+        consumer.attachQueue("OMS_HELLO_TOPIC", new MessageListener() {
+            @Override
+            public void onMessage(final Message message, final ReceivedMessageContext context) {
+                System.out.printf("Received one message: %s%n", message.headers().getString(MessageHeader.MESSAGE_ID));
+                context.ack();
+            }
+        });
+        
+    }
+}
+```