[GitHub] ShannonDing closed pull request #20: Fixed deadlock, and add args field for python callback.

2019-01-03 Thread GitBox
ShannonDing closed pull request #20: Fixed deadlock, and add args field for 
python callback.
URL: https://github.com/apache/rocketmq-client-python/pull/20
 
 
   

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/.gitignore b/.gitignore
index 990936c..b232131 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,8 @@
 .idea/
-cmake-build-debug/
+cmake-build-*/
+
+*.pyc
+*.so
+
+bin/
+
diff --git a/doc/Introduction.md b/doc/Introduction.md
index 371ad97..628079e 100644
--- a/doc/Introduction.md
+++ b/doc/Introduction.md
@@ -73,8 +73,10 @@
 --
 ## How to use
 - set LD_LIBRARY_PATH
-  ``
+  ```
   export LD_LIBRARY_PATH=/usr/local/lib
+  ```
+  
 - import module
   ```
   from librocketmqclientpython import *
@@ -90,28 +92,28 @@
 - producer must invoke following interface:
   ```
   - producer = CreateProducer("please_rename_unique_group_name");
-  - SetProducerNameServerAddress(producer,"please_rename_unique_name_server")
+  - SetProducerNameServerAddress(producer, "please_rename_unique_name_server")
   - StartProducer(producer)
-  - SendMessageSync(producer,msg)
+  - SendMessageSync(producer, msg)
   - ShutdownProducer(producer)
   - DestroyProducer(producer)
   ```
 - how to consumer messages
   ```
-  - def consumerMessage(msg):
-  - topic = GetMessageTopic(msg)
-  - body = GetMessageBody(msg)
-  - tags = GetMessageTags(msg)
-  - msgid = GetMessageId(msg)
-  - handle message
-  - return 0
+  - def consumerMessage(msg, args):
+  - topic = GetMessageTopic(msg)
+  - body = GetMessageBody(msg)
+  - tags = GetMessageTags(msg)
+  - msgid = GetMessageId(msg)
+  - # handle message...
+  - return 0
   ```
 - pushconsumer must invoke following interface:
   ```
   - consumer = CreatePushConsumer("please_rename_unique_group_name_1");
-  - 
SetPushConsumerNameServerAddress(consumer,"please_rename_unique_name_server")
+  - SetPushConsumerNameServerAddress(consumer, 
"please_rename_unique_name_server")
   - Subscribe(consumer, "your_topic", "*")
-  - RegisterMessageCallback(consumer,consumerMessage)
+  - RegisterMessageCallback(consumer, consumerMessage, args)
   - StartPushConsumer(consumer)
   - ShutdownPushConsumer(consumer)
   - DestroyPushConsumer(consumer)
@@ -122,3 +124,4 @@
   - python testProducer.py
 - push consumer
   - python testConsumer.py
+
diff --git a/doc/api-doc/consumer-push.md b/doc/api-doc/consumer-push.md
index a783e47..6ee498e 100644
--- a/doc/api-doc/consumer-push.md
+++ b/doc/api-doc/consumer-push.md
@@ -31,13 +31,14 @@
 topic: topic name
 tag: topic tag
 
-* RegisterMessageCallback(consumer, pyCallBack) 
+* RegisterMessageCallback(consumer, pyCallBack, pyArgs) 
   - function description
 set callback for push consumer instance 
 
   - input 
 consumer: consumer intance
-pyCallBack: py callback method. when message pulled, they would be send to 
a pyCallback method
+pyCallBack: py callback method. when message pulled, they would be send to 
a pyCallback method
+pyArgs: the arguments will be passed to pyCallBack
 
 * SetPushConsumerThreadCount(consumer, threadCount)
   - function description
diff --git a/sample/testConsumer.py b/sample/testConsumer.py
index 93665ed..03ca587 100644
--- a/sample/testConsumer.py
+++ b/sample/testConsumer.py
@@ -18,8 +18,10 @@
 import base
 import time
 from librocketmqclientpython import *
+
 totalMsg = 0
-def consumerMessage(msg):
+
+def consumerMessage(msg, args):
  global totalMsg
  totalMsg += 1
  print(">>ConsumerMessage Called:",totalMsg)
@@ -33,11 +35,12 @@ def consumerMessage(msg):
 
 consumer = CreatePushConsumer("awtTest_Producer_Python_Test")
 print(consumer)
-SetPushConsumerNameServerAddress(consumer,"172.17.0.2:9876")
-SetPushConsumerThreadCount(consumer,1)
+SetPushConsumerNameServerAddress(consumer, "172.17.0.2:9876")
+SetPushConsumerThreadCount(consumer, 1)
 Subscribe(consumer, "T_TestTopic", "*")
-RegisterMessageCallback(consumer,consumerMessage)
+RegisterMessageCallback(consumer, consumerMessage, None)
 StartPushConsumer(consumer)
+
 i = 1
 while i <= 60:
 print(i)
diff --git a/src/PythonWrapper.cpp b/src/PythonWrapper.cpp
index 8c7c1e2..919ba5b 100644
--- a/src/PythonWrapper.cpp
+++ b/src/PythonWrapper.cpp
@@ -30,24 +30,37 @@ using namespace std;
 const char *VERSION =
 "PYTHON_CLIENT_VERSION: " PYTHON_CLIENT_VERSION ", BUILD DATE: " 
PYCLI_BUILD_DATE " ";
 
-map g_CallBackMap;
+map> g_CallBackMap;
 
 class PyThreadStateLock {
 public:
-PyThreadStateLock(void) {
+PyThreadStateLock() {
 state = PyGILState_Ensure();
 }
 
-~PyThreadStateLock(void) {
-if (state == PyGILState_LOCKED) {
-PyGILState_Release(state);
-}
+~PyThreadStateLock() {
+// NOTE: must paired with PyGILState

[GitHub] messense opened a new pull request #50: Fix push consumer dtor segfault

2019-01-03 Thread GitBox
messense opened a new pull request #50: Fix push consumer dtor segfault
URL: https://github.com/apache/rocketmq-client-cpp/pull/50
 
 
   If the push consumer has not been started, deallocate it will segfault in 
current code.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] walking98 commented on a change in pull request #648: add architecture.md

2019-01-03 Thread GitBox
walking98 commented on a change in pull request #648: add  architecture.md
URL: https://github.com/apache/rocketmq/pull/648#discussion_r244945946
 
 

 ##
 File path: docs/cn/architecture.md
 ##
 @@ -0,0 +1,46 @@
+# 架构设计
+
+## 技术架构
+![](image/rocketmq_architecture_1.png)
+
+RocketMQ架构上主要分为四部分,如上图所示:
+
+
+- 
Producer:消息发布的角色,支持分布式集群方式部署。producer通过MQ的负载均衡模块选择相应的Broker集群队列进行消息投递。投递的过程支持快速失败并且低延迟
 
 Review comment:
   注意标点符号,结尾需要句号


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] walking98 commented on a change in pull request #648: add architecture.md

2019-01-03 Thread GitBox
walking98 commented on a change in pull request #648: add  architecture.md
URL: https://github.com/apache/rocketmq/pull/648#discussion_r244946859
 
 

 ##
 File path: docs/cn/architecture.md
 ##
 @@ -0,0 +1,46 @@
+# 架构设计
+
+## 技术架构
+![](image/rocketmq_architecture_1.png)
+
+RocketMQ架构上主要分为四部分,如上图所示:
+
+
+- 
Producer:消息发布的角色,支持分布式集群方式部署。producer通过MQ的负载均衡模块选择相应的Broker集群队列进行消息投递。投递的过程支持快速失败并且低延迟
+
+- 
Consumer:消息消费者的角色,支持分布式集群方式部署。支持以push推,pull拉两种模式对消息进行消费。同时也支持集群方式和广播形式的消费,它提供实时消息订阅机制,可以满足大多数用户的需求
+
+- 
NameServer:NameServer是一个非常简单的Topic路由注册中心,其角色类似dubbo中的zookeeper,支持Broker的动态注册与发现。主要包括两个功能:Broker管理,NameServer接受Broker集群的注册信息并且保存下来作为路由信息的基本数据。然后提供心跳检测机制,检查Broker是否还存活。路由信息管理。每个NameServer将保存关于Broker集群的整个路由信息和用于客户端查询的队列信息。然后Producer和Conumser通过NameServer就可以知道整个Broker集群的路由信息,从而进行消息的投递和消费。NameServer通常也是集群的方式部署,各实例间相互不进行信息通讯。Broker是向每一台NameServer注册自己的路由信息,所以每一个NameServer实例上面都保存一份完整的路由信息。当某个NameServer因某种原因下线了,Broker仍然可以向其它NameServer同步其路由信息,Produce,Consumer仍然可以动态感知Broker的路由的信息。
 
 
 Review comment:
   "。路由信息管理。"  -->  "; 路由信息管理,"
   
   需要注意标点符,下面的所有段落都需要仔细控制一下标点符号。


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] walking98 commented on a change in pull request #648: add architecture.md

2019-01-03 Thread GitBox
walking98 commented on a change in pull request #648: add  architecture.md
URL: https://github.com/apache/rocketmq/pull/648#discussion_r244946208
 
 

 ##
 File path: docs/cn/architecture.md
 ##
 @@ -0,0 +1,46 @@
+# 架构设计
+
+## 技术架构
+![](image/rocketmq_architecture_1.png)
+
+RocketMQ架构上主要分为四部分,如上图所示:
+
+
+- 
Producer:消息发布的角色,支持分布式集群方式部署。producer通过MQ的负载均衡模块选择相应的Broker集群队列进行消息投递。投递的过程支持快速失败并且低延迟
+
+- 
Consumer:消息消费者的角色,支持分布式集群方式部署。支持以push推,pull拉两种模式对消息进行消费。同时也支持集群方式和广播形式的消费,它提供实时消息订阅机制,可以满足大多数用户的需求
+
+- 
NameServer:NameServer是一个非常简单的Topic路由注册中心,其角色类似dubbo中的zookeeper,支持Broker的动态注册与发现。主要包括两个功能:Broker管理,NameServer接受Broker集群的注册信息并且保存下来作为路由信息的基本数据。然后提供心跳检测机制,检查Broker是否还存活。路由信息管理。每个NameServer将保存关于Broker集群的整个路由信息和用于客户端查询的队列信息。然后Producer和Conumser通过NameServer就可以知道整个Broker集群的路由信息,从而进行消息的投递和消费。NameServer通常也是集群的方式部署,各实例间相互不进行信息通讯。Broker是向每一台NameServer注册自己的路由信息,所以每一个NameServer实例上面都保存一份完整的路由信息。当某个NameServer因某种原因下线了,Broker仍然可以向其它NameServer同步其路由信息,Produce,Consumer仍然可以动态感知Broker的路由的信息。
 
 
 Review comment:
   dubbo -> Dubbo 首字母大写


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] walking98 commented on a change in pull request #648: add architecture.md

2019-01-03 Thread GitBox
walking98 commented on a change in pull request #648: add  architecture.md
URL: https://github.com/apache/rocketmq/pull/648#discussion_r244946001
 
 

 ##
 File path: docs/cn/architecture.md
 ##
 @@ -0,0 +1,46 @@
+# 架构设计
+
+## 技术架构
+![](image/rocketmq_architecture_1.png)
+
+RocketMQ架构上主要分为四部分,如上图所示:
+
+
+- 
Producer:消息发布的角色,支持分布式集群方式部署。producer通过MQ的负载均衡模块选择相应的Broker集群队列进行消息投递。投递的过程支持快速失败并且低延迟
+
+- 
Consumer:消息消费者的角色,支持分布式集群方式部署。支持以push推,pull拉两种模式对消息进行消费。同时也支持集群方式和广播形式的消费,它提供实时消息订阅机制,可以满足大多数用户的需求
 
 Review comment:
   同上


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dongeforever commented on a change in pull request #651: [ISSUE#403] fix acl config file watch bug, clean and optimize the codes for acl feature.

2019-01-03 Thread GitBox
dongeforever commented on a change in pull request #651: [ISSUE#403] fix acl 
config file watch bug,clean and optimize the codes for acl feature.
URL: https://github.com/apache/rocketmq/pull/651#discussion_r244948061
 
 

 ##
 File path: 
acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionLoader.java
 ##
 @@ -77,92 +75,52 @@ public void initialize() {
 JSONArray globalWhiteRemoteAddressesList = 
plainAclConfData.getJSONArray("globalWhiteRemoteAddresses");
 if (globalWhiteRemoteAddressesList != null && 
!globalWhiteRemoteAddressesList.isEmpty()) {
 for (int i = 0; i < globalWhiteRemoteAddressesList.size(); i++) {
-
addGlobalWhiteRemoteAddress(globalWhiteRemoteAddressesList.getString(i));
+
globalWhiteRemoteAddressStrategy.add(remoteAddressStrategyFactory.
+
getRemoteAddressStrategy(globalWhiteRemoteAddressesList.getString(i)));
 }
 }
 
 JSONArray accounts = plainAclConfData.getJSONArray("accounts");
 if (accounts != null && !accounts.isEmpty()) {
-List plainAccessList = 
accounts.toJavaList(PlainAccessConfig.class);
-for (PlainAccessConfig plainAccess : plainAccessList) {
-
this.addPlainAccessResource(getPlainAccessResource(plainAccess));
+List plainAccessConfigList = 
accounts.toJavaList(PlainAccessConfig.class);
+for (PlainAccessConfig plainAccessConfig : plainAccessConfigList) {
+PlainAccessResource plainAccessResource = 
buildPlainAccessResource(plainAccessConfig);
+
plainAccessResourceMap.put(plainAccessResource.getAccessKey(),plainAccessResource);
 }
 }
-}
 
-private void watch() {
-String version = System.getProperty("java.version");
-String[] str = StringUtils.split(version, ".");
-if (Integer.valueOf(str[1]) < 7) {
-log.warn("Watch need jdk equal or greater than 1.7, current 
version is {}", str[1]);
-return;
+this.lock.writeLock().lock();
+try {
 
 Review comment:
   Use the copy-on-write mechanism instead of lock.
   Just assign the new value to the variable.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zongtanghu commented on a change in pull request #651: [ISSUE#403] fix acl config file watch bug, clean and optimize the codes for acl feature.

2019-01-03 Thread GitBox
zongtanghu commented on a change in pull request #651: [ISSUE#403] fix acl 
config file watch bug,clean and optimize the codes for acl feature.
URL: https://github.com/apache/rocketmq/pull/651#discussion_r244950107
 
 

 ##
 File path: 
acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionLoader.java
 ##
 @@ -77,92 +75,52 @@ public void initialize() {
 JSONArray globalWhiteRemoteAddressesList = 
plainAclConfData.getJSONArray("globalWhiteRemoteAddresses");
 if (globalWhiteRemoteAddressesList != null && 
!globalWhiteRemoteAddressesList.isEmpty()) {
 for (int i = 0; i < globalWhiteRemoteAddressesList.size(); i++) {
-
addGlobalWhiteRemoteAddress(globalWhiteRemoteAddressesList.getString(i));
+
globalWhiteRemoteAddressStrategy.add(remoteAddressStrategyFactory.
+
getRemoteAddressStrategy(globalWhiteRemoteAddressesList.getString(i)));
 }
 }
 
 JSONArray accounts = plainAclConfData.getJSONArray("accounts");
 if (accounts != null && !accounts.isEmpty()) {
-List plainAccessList = 
accounts.toJavaList(PlainAccessConfig.class);
-for (PlainAccessConfig plainAccess : plainAccessList) {
-
this.addPlainAccessResource(getPlainAccessResource(plainAccess));
+List plainAccessConfigList = 
accounts.toJavaList(PlainAccessConfig.class);
+for (PlainAccessConfig plainAccessConfig : plainAccessConfigList) {
+PlainAccessResource plainAccessResource = 
buildPlainAccessResource(plainAccessConfig);
+
plainAccessResourceMap.put(plainAccessResource.getAccessKey(),plainAccessResource);
 }
 }
-}
 
-private void watch() {
-String version = System.getProperty("java.version");
-String[] str = StringUtils.split(version, ".");
-if (Integer.valueOf(str[1]) < 7) {
-log.warn("Watch need jdk equal or greater than 1.7, current 
version is {}", str[1]);
-return;
+this.lock.writeLock().lock();
+try {
 
 Review comment:
   Okay,thank,we will fix this code.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joewee opened a new issue #27: Consumers register with container occurs NPE because get target class of consumer is inaccurate

2019-01-03 Thread GitBox
joewee opened a new issue #27: Consumers  register with container occurs NPE  
because  get target class of consumer is  inaccurate
URL: https://github.com/apache/rocketmq-spring/issues/27
 
 
   The issue tracker is **ONLY** used for bug report and feature request. 
   
   Any question or RocketMQ proposal please use our [mailing 
lists](http://rocketmq.apache.org/about/contact/).
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
   - What did you expect to see?
   
   - What did you see instead?
   java.lang.NullPointerException: null
at 
org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration.validate(ListenerContainerConfiguration.java:124)
at 
org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration.registerContainer(ListenerContainerConfiguration.java:88)
at 
org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration$$Lambda$25/151847034.accept(Unknown
 Source)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:676)
at 
org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration.afterSingletonsInstantiated(ListenerContainerConfiguration.java:76)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:781)
at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at 
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
   
   
![image](https://user-images.githubusercontent.com/6845957/50637484-1ea22f80-0f95-11e9-9951-318a502728df.png)
   
![image](https://user-images.githubusercontent.com/6845957/50637511-3da0c180-0f95-11e9-9207-85889111d996.png)
   
   2. Please tell us about your environment:
   macOS jdk8 
   3. Other information (e.g. detailed explanation, logs, related issues, 
suggestions how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   3. Indicate the importance of this issue to you (blocker, must-have, 
should-have, nice-to-have). Are you currently using any workarounds to address 
this issue?
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joewee opened a new issue #28: Consumers register with container occurs NPE because get target class of consumer is inaccurate

2019-01-03 Thread GitBox
joewee opened a new issue #28: Consumers  register with container occurs NPE  
because  get target class of consumer is  inaccurate
URL: https://github.com/apache/rocketmq-spring/issues/28
 
 
   The issue tracker is **ONLY** used for bug report and feature request. 
   
   Any question or RocketMQ proposal please use our [mailing 
lists](http://rocketmq.apache.org/about/contact/).
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   Consumers  register with container occurs NPE  because  get target class of 
consumer is  inaccurate
   - What did you do (The steps to reproduce)?
   
   - What did you expect to see?
   
   - What did you see instead?
   java.lang.NullPointerException: null
at 
org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration.validate(ListenerContainerConfiguration.java:124)
at 
org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration.registerContainer(ListenerContainerConfiguration.java:88)
at 
org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration$$Lambda$25/151847034.accept(Unknown
 Source)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:676)
at 
org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration.afterSingletonsInstantiated(ListenerContainerConfiguration.java:76)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:781)
at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at 
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
   
   
![image](https://user-images.githubusercontent.com/6845957/50637484-1ea22f80-0f95-11e9-9951-318a502728df.png)
   
![image](https://user-images.githubusercontent.com/6845957/50637511-3da0c180-0f95-11e9-9207-85889111d996.png)
   
   2. Please tell us about your environment:
   macOS jdk8 
   3. Other information (e.g. detailed explanation, logs, related issues, 
suggestions how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   3. Indicate the importance of this issue to you (blocker, must-have, 
should-have, nice-to-have). Are you currently using any workarounds to address 
this issue?
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joewee opened a new pull request #29: [ISSUE #28]enhancement of judgment for consumer target class

2019-01-03 Thread GitBox
joewee opened a new pull request #29: [ISSUE #28]enhancement of judgment for 
consumer target class
URL: https://github.com/apache/rocketmq-spring/pull/29
 
 
   ## What is the purpose of the change
   fix [ISSUE #28 ]
   X
   
   ## Brief changelog
   
   XX
   
   ## Verifying this change
   
   
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily. Notice, `it would be helpful if you could finish the following 5 
checklist(the last one is not necessary)before request the community to review 
your PR`.
   
   - [x] Make sure there is a [Github 
issue](https://github.com/apache/rocketmq/issues) filed for the change (usually 
before you start working on it). Trivial changes like typos do not require a 
Github issue. Your pull request should address just this issue, without pulling 
in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException 
when host config not exist`. Each commit in the pull request should have a 
meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic 
correction, more mock a little better when cross module dependency exist. 
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs 
checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install 
-DskipITs` to make sure unit-test pass. Run `mvn clean test-compile 
failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual 
Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joewee closed issue #27: Consumers register with container occurs NPE because get target class of consumer is inaccurate

2019-01-03 Thread GitBox
joewee closed issue #27: Consumers  register with container occurs NPE  because 
 get target class of consumer is  inaccurate
URL: https://github.com/apache/rocketmq-spring/issues/27
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] chuenfaiy opened a new pull request #654: Develop

2019-01-03 Thread GitBox
chuenfaiy opened a new pull request #654: Develop
URL: https://github.com/apache/rocketmq/pull/654
 
 
   ## What is the purpose of the change
   
   RocketMQ Developer Guide doc
   
   ## Brief changelog
   
   Add the file named `operation.md` of chapter 8
   
   ## Verifying this change
   
   no functional change
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily. Notice, `it would be helpful if you could finish the following 5 
checklist(the last one is not necessary)before request the community to review 
your PR`.
   
   - [x] Make sure there is a [Github 
issue](https://github.com/apache/rocketmq/issues) filed for the change (usually 
before you start working on it). Trivial changes like typos do not require a 
Github issue. Your pull request should address just this issue, without pulling 
in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException 
when host config not exist`. Each commit in the pull request should have a 
meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic 
correction, more mock a little better when cross module dependency exist. If 
the new feature or significant change is committed, please remember to add 
integration-test in [test 
module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs 
checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install 
-DskipITs` to make sure unit-test pass. Run `mvn clean test-compile 
failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual 
Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #654: Add Operation.md In docs

2019-01-03 Thread GitBox
coveralls commented on issue #654: Add Operation.md In docs
URL: https://github.com/apache/rocketmq/pull/654#issuecomment-451148221
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20885998/badge)](https://coveralls.io/builds/20885998)
   
   Coverage decreased (-0.007%) to 43.132% when pulling 
**198400d9070c0882402148c12c0357b658c9f7d1 on chuenfaiy:develop** into 
**5c46048dcc28e3546c1312959d80d24b24d7f878 on apache:develop**.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] yejunyu opened a new pull request #655: 1. Simple Example

2019-01-03 Thread GitBox
yejunyu opened a new pull request #655: 1. Simple Example
URL: https://github.com/apache/rocketmq/pull/655
 
 
   ## What is the purpose of the change
   
   add a example.md
   
   ## Brief changelog
   
   1. Simple Example
   2. Order Example
   3. Schedule Example
   4. Batch Example
   5. Filter Example
   6. Transaction Example
   7. Logappender Example
   8. OpenMessaging Example
   
   ## Verifying this change
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily. Notice, `it would be helpful if you could finish the following 5 
checklist(the last one is not necessary)before request the community to review 
your PR`.
   
   - [x] Make sure there is a [Github 
issue](https://github.com/apache/rocketmq/issues) filed for the change (usually 
before you start working on it). Trivial changes like typos do not require a 
Github issue. Your pull request should address just this issue, without pulling 
in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException 
when host config not exist`. Each commit in the pull request should have a 
meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic 
correction, more mock a little better when cross module dependency exist. If 
the new feature or significant change is committed, please remember to add 
integration-test in [test 
module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs 
checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install 
-DskipITs` to make sure unit-test pass. Run `mvn clean test-compile 
failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual 
Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread Shannon
Hello RocketMQ Community,

This is the discussion for the graduation of RocketMQ’s golang client(
https://github.com/apache/rocketmq-client-go 
).

RocketMQ-client-go is the golang client of Apache RocketMQ, The
RocketMQ golang client library is built on the existing CPP client
library and exposes almost all of the features in CPP client.

As the CPP client has been used by several companies and main features have
been verified in their production environment, therefore, we have reason to
believe that golang client has the same stability with CPP client. and the
most important of all, up to now, there are 9 active contributors from 6
organizations in the community.
So we think it has reached the graduation standard, but in order to ensure
the quality of the project, we still investigated the usage information of
three companies from different industries, the information shows below:
1 An Express Company
1)Environment Configuration:
   CentOS 7
   2) Functions
Synchronous transmission with binlog messages
Consume message with Pull mode
  3)scene
Mainly used for system decoupling, data synchronization.
  4)Usage description
Go SDK is relatively stable and there is no problem for the
time being.
2 A technology company
   1)Environment Configuration:
   CentOS 6.8
   2) Functions
Synchronous transmission 
Consume message with Pull mode
   3)Usage description
 there is no problem for the time being.

3 Database department of Alibaba
   1)Environment Configuration:
   Linux Core 3.10
   2) Functions
PushConsumer with cluster mode
  3)scene
Mainly used for receiving server state change information from 
RocketMQ, so as to facilitate some automatic operation and maintenance 
decisions.

If you have any suggestion about the graduation of the Golang client, please 
feel free to reply to this email, we sincerely hope to get your advice.

[GitHub] coveralls commented on issue #655: 1. Simple Example

2019-01-03 Thread GitBox
coveralls commented on issue #655: 1. Simple Example
URL: https://github.com/apache/rocketmq/pull/655#issuecomment-451162216
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20886741/badge)](https://coveralls.io/builds/20886741)
   
   Coverage increased (+0.02%) to 43.162% when pulling 
**9d0e4296c0b95525edfde6c171c932ccad1f3c45 on yejunyu:develop** into 
**5c46048dcc28e3546c1312959d80d24b24d7f878 on apache:develop**.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


Re: [DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread liqipeng
Very good news. Hope it come soon
> 在 2019年1月3日,下午10:30,Shannon  写道:
> 
> Hello RocketMQ Community,
> 
> This is the discussion for the graduation of RocketMQ’s golang client(
> https://github.com/apache/rocketmq-client-go 
> ).
> 
> RocketMQ-client-go is the golang client of Apache RocketMQ, The
> RocketMQ golang client library is built on the existing CPP client
> library and exposes almost all of the features in CPP client.
> 
> As the CPP client has been used by several companies and main features have
> been verified in their production environment, therefore, we have reason to
> believe that golang client has the same stability with CPP client. and the
> most important of all, up to now, there are 9 active contributors from 6
> organizations in the community.
> So we think it has reached the graduation standard, but in order to ensure
> the quality of the project, we still investigated the usage information of
> three companies from different industries, the information shows below:
> 1 An Express Company
>1)Environment Configuration:
>   CentOS 7
>   2) Functions
>Synchronous transmission with binlog messages
>Consume message with Pull mode
>  3)scene
>Mainly used for system decoupling, data synchronization.
>  4)Usage description
>Go SDK is relatively stable and there is no problem for the
> time being.
> 2 A technology company
>   1)Environment Configuration:
>   CentOS 6.8
>   2) Functions
>Synchronous transmission 
>Consume message with Pull mode
>   3)Usage description
> there is no problem for the time being.
> 
> 3 Database department of Alibaba
>   1)Environment Configuration:
>   Linux Core 3.10
>   2) Functions
>PushConsumer with cluster mode
>  3)scene
>Mainly used for receiving server state change information from 
> RocketMQ, so as to facilitate some automatic operation and maintenance 
> decisions.
> 
> If you have any suggestion about the graduation of the Golang client, please 
> feel free to reply to this email, we sincerely hope to get your advice.



[GitHub] stcai opened a new pull request #51: be able to build examples with static client

2019-01-03 Thread GitBox
stcai opened a new pull request #51: be able to build examples with static 
client
URL: https://github.com/apache/rocketmq-client-cpp/pull/51
 
 
   Be able to build examples while cmake option "BUILD_ROCKETMQ_SHARED" is 
turned off.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] xox9001 opened a new issue #656: mqadmin queryMsgById Command

2019-01-03 Thread GitBox
xox9001 opened a new issue #656: mqadmin queryMsgById Command 
URL: https://github.com/apache/rocketmq/issues/656
 
 
   i try query msg by msgId , but command Prompt error。 follow message " 
connect to <152.31.168.192:5664> failed " is error,IP address is 
192.168.31.152,not 152.31.168.192:5664.
   =
   ./mqadmin queryMsgById -d ppp -g ShowCommand -i 
981FA8C01622BD5803150100 -n localhost:9876
   Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; 
support was removed in 8.0
   Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; 
support was removed in 8.0
   org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 
<152.31.168.192:5664> failed
at 
org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:393)
at 
org.apache.rocketmq.client.impl.MQClientAPIImpl.viewMessage(MQClientAPIImpl.java:661)
at 
org.apache.rocketmq.client.impl.MQAdminImpl.viewMessage(MQAdminImpl.java:252)
at 
org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.viewMessage(DefaultMQAdminExtImpl.java:958)
at 
org.apache.rocketmq.tools.admin.DefaultMQAdminExtImpl.consumeMessageDirectly(DefaultMQAdminExtImpl.java:724)
at 
org.apache.rocketmq.tools.admin.DefaultMQAdminExt.consumeMessageDirectly(DefaultMQAdminExt.java:397)
at 
org.apache.rocketmq.tools.command.message.QueryMsgByIdSubCommand.pushMsg(QueryMsgByIdSubCommand.java:269)
at 
org.apache.rocketmq.tools.command.message.QueryMsgByIdSubCommand.execute(QueryMsgByIdSubCommand.java:237)
at 
org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:132)
at 
org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:83)


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] xox9001 opened a new issue #657: query new topic first message fail, but message list have message

2019-01-03 Thread GitBox
xox9001 opened a new issue #657: query new topic first message fail,but message 
list have message
URL: https://github.com/apache/rocketmq/issues/657
 
 
   英语水平比较差,大家凑合看吧。
   =
   rocketmq version: 4.3.2 (namesrv,broker)
   =
   process:
   1、create new topic
   2、use golang client send no key and no tag and has delay level message
   3、open rocketmq-console-ng,go MESSAGE PAGE, select created topic, show topic 
message by time(default), in message list,only 1 message,i call it #1, #1 
message is OK.
   
   But, click #1 message detail ,alert exception.
   use #1 msgId search  in rocketmq-console-ng page,tips no message.
   But,producer push more message,after #1 msg, other msg is normal。
   
Chinese = BUG 还原:
   1、创建一个新的TOPIC
   2、使用 golang 客户端(by https://github.com/apache/rocketmq-client-go)提交一条没有key 
没有tag 并且延迟等级任意(这里我设置的是1)的消息。
   
3、打开RocketMq-Console-Ng,根据topic查看消息列表,这条消息可以列出,但是点击消息详情,却提示失败,检查RocketMq-Console-Ng的runtime
 log ,提示消息查找完成,但是没有消息返回。
   使用 mqadmin 查询这条 msgID,却提示连接broker 失败,正确broker IP:192.168.31.152 在回显中被显示为 
152.31.168.192:5664,尴尬。
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] xox9001 commented on issue #657: query new topic first message fail, but message list have message

2019-01-03 Thread GitBox
xox9001 commented on issue #657: query new topic first message fail,but message 
list have message
URL: https://github.com/apache/rocketmq/issues/657#issuecomment-451243786
 
 
   > msg := fmt.Sprintf("Hello RocketMQ-%d", i)
   >msgT := new(rocketmq.Message)
   >msgT.Topic = "orderlyTest"
   >msgT.Body = "msg,I:"+strconv.Itoa(i)
   >msgT.DelayTimeLevel = 1
   >//msgT.Keys = strconv.Itoa(i)
   >//msgT.Tags = "test"
   >//result,err := producer.SendMessageSync(msgT)
   >selector := queueSelectorByOrderID{}
   >result,err := producer.SendMessageOrderly(msgT,selector,4,3)


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] xox9001 edited a comment on issue #657: query new topic first message fail, but message list have message

2019-01-03 Thread GitBox
xox9001 edited a comment on issue #657: query new topic first message fail,but 
message list have message
URL: https://github.com/apache/rocketmq/issues/657#issuecomment-451243786
 
 
   > config := new(rocketmq.ProducerConfig)
   >config.GroupID = "testGroup"
   >config.NameServer = "localhost:9876"
   > 
   >producer,error := rocketmq.NewProducer(config)
   > 
   >if error != nil {
   >fmt.Println(error)
   >}
   > 
   >producer.Start()
   >defer producer.Shutdown()
   >fmt.Printf("Producer: %s started... \n", producer)
   >var i= 0
   >//for {
   > 
   >msg := fmt.Sprintf("Hello RocketMQ-%d", i)
   >msgT := new(rocketmq.Message)
   >msgT.Topic = "orderlyTest"
   >msgT.Body = "msg,I:"+strconv.Itoa(i)
   >msgT.DelayTimeLevel = 1
   >//msgT.Keys = strconv.Itoa(i)
   >//msgT.Tags = "test"
   >//result,err := producer.SendMessageSync(msgT)
   >selector := queueSelectorByOrderID{}
   >result,err := producer.SendMessageOrderly(msgT,selector,4,3)
   > 
   >if err != nil {
   >fmt.Println(err)
   >}
   > 
   >//fmt.Println(fmt.Sprintf("send message: %s result: %s", msg, 
result))
   >glog.Infof("send message: %s result: %s", msg, result)
   >time.Sleep(1 * time.Second)
   >i++
   >//}
   > 
   >//producer.Shutdown() 981FA8C06612C0EFB6140100
   >return


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] xox9001 edited a comment on issue #657: query new topic first message fail, but message list have message

2019-01-03 Thread GitBox
xox9001 edited a comment on issue #657: query new topic first message fail,but 
message list have message
URL: https://github.com/apache/rocketmq/issues/657#issuecomment-451243786
 
 
   ```
   config := new(rocketmq.ProducerConfig)
config.GroupID = "testGroup"
config.NameServer = "localhost:9876"
   
producer,error := rocketmq.NewProducer(config)
   
if error != nil {
fmt.Println(error)
}
   
producer.Start()
defer producer.Shutdown()
fmt.Printf("Producer: %s started... \n", producer)
var i= 0
//for {
   
msg := fmt.Sprintf("Hello RocketMQ-%d", i)
msgT := new(rocketmq.Message)
msgT.Topic = "orderlyTest"
msgT.Body = "msg,I:"+strconv.Itoa(i)
msgT.DelayTimeLevel = 1
//msgT.Keys = strconv.Itoa(i)
//msgT.Tags = "test"
//result,err := producer.SendMessageSync(msgT)
selector := queueSelectorByOrderID{}
result,err := producer.SendMessageOrderly(msgT,selector,4,3)
   
if err != nil {
fmt.Println(err)
}
   
//fmt.Println(fmt.Sprintf("send message: %s result: %s", msg, 
result))
glog.Infof("send message: %s result: %s", msg, result)
time.Sleep(1 * time.Second)
i++
//}
   
//producer.Shutdown() 981FA8C06612C0EFB6140100
return
   ```


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245179695
 
 

 ##
 File path: src/MQClientAPIImpl.cpp
 ##
 @@ -411,13 +410,38 @@ void MQClientAPIImpl::sendMessageAsync(const string& 
addr,
const MQMessage& msg,
RemotingCommand& request,
SendCallback* pSendCallback,
-   int64 timeoutMilliseconds) {
+   int64 timeoutMilliseconds,
+   int maxRetryTimes,
+   int retrySendTimes) {
+  int64 begin_time = UtilAll::currentTimeMillis();
   //invokeAsync(addr, request, cbw, timeoutMilliseconds) 
==
+  AsyncCallbackWrap* cbw = new SendCallbackWrap(brokerName, msg, 
pSendCallback, this);
+
+  LOG_DEBUG("sendMessageAsync request:%s, timeout:%lld, maxRetryTimes:%d 
retrySendTimes:%d", request.ToString().data(), timeoutMilliseconds, 
maxRetryTimes, retrySendTimes);
+  
+  if (m_pRemotingClient->invokeAsync(addr, request, cbw, timeoutMilliseconds, 
maxRetryTimes, retrySendTimes) ==
   false) {
-LOG_ERROR("sendMessageAsync failed to addr:%s", addr.c_str());
+LOG_WARN("invokeAsync failed to addr:%s,topic:%s, timeout:%lld, 
maxRetryTimes:%d, retrySendTimes:%d", 
 
 Review comment:
   it a normal operation, also can use warning log to prominent


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245179736
 
 

 ##
 File path: src/protocol/RemotingCommand.cpp
 ##
 @@ -250,4 +290,15 @@ void RemotingCommand::addExtField(const string& key, 
const string& value) {
   m_extFields[key] = value;
 }
 
+std::string RemotingCommand::ToString() {
 
 Review comment:
   ok


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245180012
 
 

 ##
 File path: src/MQClientAPIImpl.cpp
 ##
 @@ -411,13 +410,38 @@ void MQClientAPIImpl::sendMessageAsync(const string& 
addr,
const MQMessage& msg,
RemotingCommand& request,
SendCallback* pSendCallback,
-   int64 timeoutMilliseconds) {
+   int64 timeoutMilliseconds,
+   int maxRetryTimes,
+   int retrySendTimes) {
+  int64 begin_time = UtilAll::currentTimeMillis();
   //invokeAsync(addr, request, cbw, timeoutMilliseconds) 
==
+  AsyncCallbackWrap* cbw = new SendCallbackWrap(brokerName, msg, 
pSendCallback, this);
+
+  LOG_DEBUG("sendMessageAsync request:%s, timeout:%lld, maxRetryTimes:%d 
retrySendTimes:%d", request.ToString().data(), timeoutMilliseconds, 
maxRetryTimes, retrySendTimes);
+  
+  if (m_pRemotingClient->invokeAsync(addr, request, cbw, timeoutMilliseconds, 
maxRetryTimes, retrySendTimes) ==
   false) {
-LOG_ERROR("sendMessageAsync failed to addr:%s", addr.c_str());
+LOG_WARN("invokeAsync failed to addr:%s,topic:%s, timeout:%lld, 
maxRetryTimes:%d, retrySendTimes:%d", 
+   addr.c_str(), msg.getTopic().data(), timeoutMilliseconds, 
maxRetryTimes, retrySendTimes);
+   //when getTcp return false, need consider retrySendTimes
+   int retry_time = retrySendTimes + 1;
+   int64 time_out = timeoutMilliseconds - (UtilAll::currentTimeMillis() - 
begin_time);
+   while (retry_time < maxRetryTimes && time_out > 0) {
+   begin_time = UtilAll::currentTimeMillis();
+   if (m_pRemotingClient->invokeAsync(addr, request, cbw, 
time_out, maxRetryTimes, retry_time) == false) {
+   retry_time += 1;
+   time_out = time_out - (UtilAll::currentTimeMillis() - 
begin_time);
+   LOG_WARN("invokeAsync retry failed to addr:%s,topic:%s, 
timeout:%lld, maxRetryTimes:%d, retrySendTimes:%d", 
+   addr.c_str(), msg.getTopic().data(), time_out, 
maxRetryTimes, retry_time);
+   continue;
+   } else {
+   return; //invokeAsync success
 
 Review comment:
   here no need, because normally it will success, if it fail ,there is a 
warning log in the retry section and a error log after retry section


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245180056
 
 

 ##
 File path: src/transport/ResponseFuture.cpp
 ##
 @@ -148,6 +151,10 @@ void ResponseFuture::executeInvokeCallbackException() {
 return;
   } else {
 if (m_asyncCallbackStatus == asyncCallBackStatus_timeout) {
+
+   //here no need retrySendTimes process because of it have timeout
 
 Review comment:
   ok


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245180810
 
 

 ##
 File path: src/MQClientAPIImpl.cpp
 ##
 @@ -411,13 +410,38 @@ void MQClientAPIImpl::sendMessageAsync(const string& 
addr,
const MQMessage& msg,
RemotingCommand& request,
SendCallback* pSendCallback,
-   int64 timeoutMilliseconds) {
+   int64 timeoutMilliseconds,
+   int maxRetryTimes,
+   int retrySendTimes) {
+  int64 begin_time = UtilAll::currentTimeMillis();
   //invokeAsync(addr, request, cbw, timeoutMilliseconds) 
==
+  AsyncCallbackWrap* cbw = new SendCallbackWrap(brokerName, msg, 
pSendCallback, this);
+
+  LOG_DEBUG("sendMessageAsync request:%s, timeout:%lld, maxRetryTimes:%d 
retrySendTimes:%d", request.ToString().data(), timeoutMilliseconds, 
maxRetryTimes, retrySendTimes);
 
 Review comment:
   here no log before, i add a debug here just for debug when need debug issue, 
here no need info, there will so many logs here 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245181130
 
 

 ##
 File path: src/protocol/RemotingCommand.h
 ##
 @@ -66,6 +70,8 @@ class RemotingCommand {
   void Encode();
   static RemotingCommand* Decode(const MemoryBlock& mem);
 
+  std::string ToString();
 
 Review comment:
   ToString() with const


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245182632
 
 

 ##
 File path: src/protocol/RemotingCommand.cpp
 ##
 @@ -50,6 +50,46 @@ RemotingCommand::RemotingCommand(int code, string language, 
int version,
   m_remark(remark),
   m_pExtHeader(pExtHeader) {}
 
+RemotingCommand::RemotingCommand(const RemotingCommand& command) {
+  m_code = command.m_code;
+  m_language = command.m_language;
+  m_version = command.m_version;
+  m_opaque = command.m_opaque;
+  m_flag = command.m_flag;
+  m_remark = command.m_remark;
+  m_msgBody = command.m_msgBody;
+  
+  for (auto& it : command.m_extFields) {
 
 Review comment:
   it doesn't matter


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245183402
 
 

 ##
 File path: src/protocol/RemotingCommand.cpp
 ##
 @@ -50,6 +50,46 @@ RemotingCommand::RemotingCommand(int code, string language, 
int version,
   m_remark(remark),
   m_pExtHeader(pExtHeader) {}
 
+RemotingCommand::RemotingCommand(const RemotingCommand& command) {
 
 Review comment:
   there are too many the members, so no need use this style


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245183462
 
 

 ##
 File path: src/transport/TcpRemotingClient.h
 ##
 @@ -46,11 +46,10 @@ class TcpRemotingClient {
 
   bool invokeHeartBeat(const string& addr, RemotingCommand& request);
 
-  bool invokeAsync(const string& addr, RemotingCommand& request,
-   AsyncCallbackWrap* cbw, int64 timeoutMilliseconds);
-
+  bool invokeAsync(const string& addr, RemotingCommand& request, 
AsyncCallbackWrap* cbw, 
+   int64 timeoutMilliseconds, int maxRetrySendTimes=1, int 
retrySendTimes=1);
   void invokeOneway(const string& addr, RemotingCommand& request);
-
+  
 
 Review comment:
   ok


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245183678
 
 

 ##
 File path: src/protocol/RemotingCommand.cpp
 ##
 @@ -50,6 +50,46 @@ RemotingCommand::RemotingCommand(int code, string language, 
int version,
   m_remark(remark),
   m_pExtHeader(pExtHeader) {}
 
+RemotingCommand::RemotingCommand(const RemotingCommand& command) {
+  m_code = command.m_code;
+  m_language = command.m_language;
+  m_version = command.m_version;
+  m_opaque = command.m_opaque;
+  m_flag = command.m_flag;
+  m_remark = command.m_remark;
+  m_msgBody = command.m_msgBody;
+  
+  for (auto& it : command.m_extFields) {
+ m_extFields[it.first] = it.second;
+  }
+  m_head = command.m_head;
+  m_body = command.m_body;
+  s_seqNumber.store(command.s_seqNumber.load());
+  m_parsedJson = command.m_parsedJson;
+  //m_pExtHeader = command.m_pExtHeader; //ignore this filed at this moment, 
if need please add it
+}
+
+
+RemotingCommand& RemotingCommand::operator=(const RemotingCommand& command) {
+  m_code = command.m_code;
 
 Review comment:
   ok, change to call a same function


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jonnxu commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jonnxu commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245183701
 
 

 ##
 File path: src/transport/ResponseFuture.cpp
 ##
 @@ -164,6 +171,39 @@ bool ResponseFuture::isTimeOut() const {
   return m_bAsync.load() == 1 && diff > m_timeout;
 }
 
+int ResponseFuture::getMaxRetrySendTimes() const {
+   return m_maxRetrySendTimes;
+} 
+int ResponseFuture::getRetrySendTimes() const {
+   return m_retrySendTimes;
+}
+
+void ResponseFuture::setMaxRetrySendTimes(int maxRetryTimes) {
+   m_maxRetrySendTimes = maxRetryTimes;
+}
+void ResponseFuture::setRetrySendTimes(int retryTimes) {
+   m_retrySendTimes = retryTimes;
+}
+
+void ResponseFuture::setBrokerAddr(const std::string& brokerAddr) {
+   m_brokerAddr = brokerAddr;
+}
+void ResponseFuture::setRequestCommand(const RemotingCommand& requestCommand) {
+   m_requestCommand = requestCommand;
+}
+
+const RemotingCommand& ResponseFuture::getRequestCommand() {
+   return m_requestCommand;
+}
+std::string ResponseFuture::getBrokerAddr() const {
+   return m_brokerAddr;
+}
+
+int64 ResponseFuture::leftTime() const {
 
 Review comment:
   it doesn't matter


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joewee closed pull request #29: [ISSUE #28]enhancement of judgment for consumer target class

2019-01-03 Thread GitBox
joewee closed pull request #29: [ISSUE #28]enhancement of judgment for consumer 
target class
URL: https://github.com/apache/rocketmq-spring/pull/29
 
 
   

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/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java
 
b/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java
index da66132..b0bb935 100644
--- 
a/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java
+++ 
b/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java
@@ -25,6 +25,7 @@
 import org.apache.rocketmq.spring.support.DefaultRocketMQListenerContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.aop.framework.AopProxyUtils;
 import org.springframework.aop.support.AopUtils;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.SmartInitializingSingleton;
@@ -78,7 +79,7 @@ public void afterSingletonsInstantiated() {
 }
 
 private void registerContainer(String beanName, Object bean) {
-Class clazz = AopUtils.getTargetClass(bean);
+Class clazz = AopProxyUtils.ultimateTargetClass(bean);
 
 if (!RocketMQListener.class.isAssignableFrom(bean.getClass())) {
 throw new IllegalStateException(clazz + " is not instance of " + 
RocketMQListener.class.getName());
diff --git 
a/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java
 
b/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java
index 7031dce..ded7e1f 100644
--- 
a/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java
+++ 
b/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java
@@ -36,6 +36,7 @@
 import org.apache.rocketmq.spring.core.RocketMQPushConsumerLifecycleListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.aop.framework.AopProxyUtils;
 import org.springframework.aop.support.AopUtils;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.context.SmartLifecycle;
@@ -351,13 +352,7 @@ private Object doConvertMessage(MessageExt messageExt) {
 }
 
 private Class getMessageType() {
-Class targetClass = AopUtils.getTargetClass(rocketMQListener);
-Type[] interfaces = targetClass.getGenericInterfaces();
-Class superclass = targetClass.getSuperclass();
-while ((Objects.isNull(interfaces) || 0 == interfaces.length) && 
Objects.nonNull(superclass)) {
-interfaces = superclass.getGenericInterfaces();
-superclass = targetClass.getSuperclass();
-}
+Type[] interfaces = 
AopProxyUtils.ultimateTargetClass(rocketMQListener).getGenericInterfaces();
 if (Objects.nonNull(interfaces)) {
 for (Type type : interfaces) {
 if (type instanceof ParameterizedType) {


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jovan-wong commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jovan-wong commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245186534
 
 

 ##
 File path: src/transport/ResponseFuture.cpp
 ##
 @@ -164,6 +171,39 @@ bool ResponseFuture::isTimeOut() const {
   return m_bAsync.load() == 1 && diff > m_timeout;
 }
 
+int ResponseFuture::getMaxRetrySendTimes() const {
+   return m_maxRetrySendTimes;
+} 
+int ResponseFuture::getRetrySendTimes() const {
+   return m_retrySendTimes;
+}
+
+void ResponseFuture::setMaxRetrySendTimes(int maxRetryTimes) {
+   m_maxRetrySendTimes = maxRetryTimes;
+}
+void ResponseFuture::setRetrySendTimes(int retryTimes) {
+   m_retrySendTimes = retryTimes;
+}
+
+void ResponseFuture::setBrokerAddr(const std::string& brokerAddr) {
+   m_brokerAddr = brokerAddr;
+}
+void ResponseFuture::setRequestCommand(const RemotingCommand& requestCommand) {
+   m_requestCommand = requestCommand;
+}
+
+const RemotingCommand& ResponseFuture::getRequestCommand() {
+   return m_requestCommand;
+}
+std::string ResponseFuture::getBrokerAddr() const {
+   return m_brokerAddr;
+}
+
+int64 ResponseFuture::leftTime() const {
 
 Review comment:
   But this name might make us confused actually right?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jovan-wong commented on a change in pull request #48: [Issue#44] Resolve RetrySendTimes doesn't Work for Async Send

2019-01-03 Thread GitBox
jovan-wong commented on a change in pull request #48: [Issue#44] Resolve 
RetrySendTimes doesn't Work for Async Send
URL: https://github.com/apache/rocketmq-client-cpp/pull/48#discussion_r245186911
 
 

 ##
 File path: src/MQClientAPIImpl.cpp
 ##
 @@ -411,13 +410,38 @@ void MQClientAPIImpl::sendMessageAsync(const string& 
addr,
const MQMessage& msg,
RemotingCommand& request,
SendCallback* pSendCallback,
-   int64 timeoutMilliseconds) {
+   int64 timeoutMilliseconds,
+   int maxRetryTimes,
+   int retrySendTimes) {
+  int64 begin_time = UtilAll::currentTimeMillis();
   //invokeAsync(addr, request, cbw, timeoutMilliseconds) 
==
+  AsyncCallbackWrap* cbw = new SendCallbackWrap(brokerName, msg, 
pSendCallback, this);
+
+  LOG_DEBUG("sendMessageAsync request:%s, timeout:%lld, maxRetryTimes:%d 
retrySendTimes:%d", request.ToString().data(), timeoutMilliseconds, 
maxRetryTimes, retrySendTimes);
+  
+  if (m_pRemotingClient->invokeAsync(addr, request, cbw, timeoutMilliseconds, 
maxRetryTimes, retrySendTimes) ==
   false) {
-LOG_ERROR("sendMessageAsync failed to addr:%s", addr.c_str());
+LOG_WARN("invokeAsync failed to addr:%s,topic:%s, timeout:%lld, 
maxRetryTimes:%d, retrySendTimes:%d", 
 
 Review comment:
   If it's a normal op, this log will be printed everywhere.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls edited a comment on issue #651: [ISSUE#403] fix acl config file watch bug, clean and optimize the codes for acl feature.

2019-01-03 Thread GitBox
coveralls edited a comment on issue #651: [ISSUE#403] fix acl config file watch 
bug,clean and optimize the codes for acl feature.
URL: https://github.com/apache/rocketmq/pull/651#issuecomment-450827735
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20897749/badge)](https://coveralls.io/builds/20897749)
   
   Coverage increased (+0.05%) to 44.88% when pulling 
**9be513d14b2b29d9aa8eb18aeb071fe6dc161012 on wangshaojie4039:msg_track** into 
**8afd3bf97c88df86cc4ba8e6a4ce8baf478f0abb on apache:msg_track**.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joewee opened a new pull request #30: [ISSUE #28]enhancement of judgment for consumer target class

2019-01-03 Thread GitBox
joewee opened a new pull request #30: [ISSUE #28]enhancement of judgment for 
consumer target class
URL: https://github.com/apache/rocketmq-spring/pull/30
 
 
   ## What is the purpose of the change
   
   [ISSUE #28]enhancement of judgment for consumer target class
   
   ## Brief changelog
   
   replace get target class method AopUtils#getTargetClass with 
AopProxyUtils#ultimateTargetClass
   
   ## Verifying this change
   
   
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily. Notice, `it would be helpful if you could finish the following 5 
checklist(the last one is not necessary)before request the community to review 
your PR`.
   
   - [x] Make sure there is a [Github 
issue](https://github.com/apache/rocketmq/issues) filed for the change (usually 
before you start working on it). Trivial changes like typos do not require a 
Github issue. Your pull request should address just this issue, without pulling 
in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException 
when host config not exist`. Each commit in the pull request should have a 
meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic 
correction, more mock a little better when cross module dependency exist. 
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs 
checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install 
-DskipITs` to make sure unit-test pass. Run `mvn clean test-compile 
failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual 
Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


回复: Re: [DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread huzongt...@cmss.chinamobile.com
Very good news.Congratulation!



huzongt...@cmss.chinamobile.com
 
发件人: liqipeng
发送时间: 2019-01-03 22:43
收件人: dev
主题: Re: [DISCUSS]The graduation of RocketMQ's golang client
Very good news. Hope it come soon
> 在 2019年1月3日,下午10:30,Shannon  写道:
> 
> Hello RocketMQ Community,
> 
> This is the discussion for the graduation of RocketMQ’s golang client(
> https://github.com/apache/rocketmq-client-go 
> ).
> 
> RocketMQ-client-go is the golang client of Apache RocketMQ, The
> RocketMQ golang client library is built on the existing CPP client
> library and exposes almost all of the features in CPP client.
> 
> As the CPP client has been used by several companies and main features have
> been verified in their production environment, therefore, we have reason to
> believe that golang client has the same stability with CPP client. and the
> most important of all, up to now, there are 9 active contributors from 6
> organizations in the community.
> So we think it has reached the graduation standard, but in order to ensure
> the quality of the project, we still investigated the usage information of
> three companies from different industries, the information shows below:
> 1 An Express Company
>1)Environment Configuration:
>   CentOS 7
>   2) Functions
>Synchronous transmission with binlog messages
>Consume message with Pull mode
>  3)scene
>Mainly used for system decoupling, data synchronization.
>  4)Usage description
>Go SDK is relatively stable and there is no problem for the
> time being.
> 2 A technology company
>   1)Environment Configuration:
>   CentOS 6.8
>   2) Functions
>Synchronous transmission 
>Consume message with Pull mode
>   3)Usage description
> there is no problem for the time being.
> 
> 3 Database department of Alibaba
>   1)Environment Configuration:
>   Linux Core 3.10
>   2) Functions
>PushConsumer with cluster mode
>  3)scene
>Mainly used for receiving server state change information from 
> RocketMQ, so as to facilitate some automatic operation and maintenance 
> decisions.
> 
> If you have any suggestion about the graduation of the Golang client, please 
> feel free to reply to this email, we sincerely hope to get your advice.
 


[GitHub] ShannonDing opened a new pull request #21: Support macOS Mojave 10.14.2

2019-01-03 Thread GitBox
ShannonDing opened a new pull request #21: Support macOS Mojave 10.14.2
URL: https://github.com/apache/rocketmq-client-python/pull/21
 
 
   Support macOS Mojave 10.14.2


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] vongosling closed pull request #21: Support macOS Mojave 10.14.2

2019-01-03 Thread GitBox
vongosling closed pull request #21: Support macOS Mojave 10.14.2
URL: https://github.com/apache/rocketmq-client-python/pull/21
 
 
   

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/CMakeLists.txt b/CMakeLists.txt
index 12c0500..7df3c84 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,7 @@ set(CXX_FLAGS
 -fPIC
 -fno-strict-aliasing
 -Wno-unused-result
+-Wno-unused-local-typedef
 # -finline-limit=1000
 # -Wextra
 # -pedantic
diff --git a/project/CMakeLists.txt b/project/CMakeLists.txt
index c1b83f2..152c5e3 100644
--- a/project/CMakeLists.txt
+++ b/project/CMakeLists.txt
@@ -17,16 +17,16 @@
 
 project(rocketmqclientpython)
 
-file(GLOB_RECURSE SRC_FILES   ${CMAKE_SOURCE_DIR}/src/*)
+file(GLOB_RECURSE SRC_FILES ${CMAKE_SOURCE_DIR}/src/*)
 
 # subdirs
 SET(SUB_DIRS)
 file(GLOB children ${CMAKE_SOURCE_DIR}/src/*)
-FOREACH(child ${children})
-   IF(IS_DIRECTORY ${child})
-   LIST(APPEND SUB_DIRS ${child})
-   ENDIF()
-ENDFOREACH()
+FOREACH (child ${children})
+IF (IS_DIRECTORY ${child})
+LIST(APPEND SUB_DIRS ${child})
+ENDIF ()
+ENDFOREACH ()
 LIST(APPEND SUB_DIRS ${CMAKE_SOURCE_DIR}/src)
 
 # include_directories
@@ -43,15 +43,19 @@ set_target_properties(rocketmqclientpython_static 
PROPERTIES OUTPUT_NAME "rocket
 target_link_libraries(rocketmqclientpython_static ${deplibs})
 target_link_libraries(rocketmqclientpython_static ${ROCKETMQ_LIBRARIES})
 target_link_libraries(rocketmqclientpython_static ${Boost_LIBRARIES})
-
+target_link_libraries(rocketmqclientpython_static ${PYTHON_LIBRARIES})
 # shared
 set(CMAKE_SHARED_LINKER_FLAGS "-fPIC -shared")
 add_library(rocketmqclientpython_shared SHARED ${SRC_FILES})
 set_target_properties(rocketmqclientpython_shared PROPERTIES OUTPUT_NAME 
"rocketmqclientpython")
+if (APPLE)
+set_target_properties(rocketmqclientpython_shared PROPERTIES SUFFIX .so)
+endif (APPLE)
 target_link_libraries(rocketmqclientpython_shared ${deplibs})
 target_link_libraries(rocketmqclientpython_shared ${ROCKETMQ_LIBRARIES})
 target_link_libraries(rocketmqclientpython_shared ${Boost_LIBRARIES})
+target_link_libraries(rocketmqclientpython_shared ${PYTHON_LIBRARIES})
 
 # install
-install (TARGETS   rocketmqclientpython_shared DESTINATION lib)
+install(TARGETS rocketmqclientpython_shared DESTINATION lib)
 


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ShannonDing opened a new issue #52: Get Transport death lock if all brokers shutdown unnormally

2019-01-03 Thread GitBox
ShannonDing opened a new issue #52: Get Transport death lock if all brokers 
shutdown unnormally
URL: https://github.com/apache/rocketmq-client-cpp/issues/52
 
 
   # Test Env:
 - 1broker
 - 1 push consumer
   
   # How to reproduce:
 - Use push consumer to connect to broker,
 - shutdown the broker
 - restart the broker
 - check the consumer
   
   # logs:
   ```
   [2018-Dec-12 07:29:30.760170](info):namesrvIndex is:8, index:0, 
namesrvaddrlist size:1
   
   [2018-Dec-12 07:29:31.240943](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:31.637820](info):eventcb: received event:11 on fd:14
   
   [2018-Dec-12 07:29:31.637899](info):eventcb:rcv error event cb:11 on fd:14
   
   [2018-Dec-12 07:29:31.637931](info):event_base_dispatch exit once
   
   [2018-Dec-12 07:29:32.241539](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:33.242114](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:33.760524](error):GetTransport of:172.17.0.2:9876 get 
timed_mutex timeout
   
   [2018-Dec-12 07:29:33.760650](info):updateTopicRouteInfoFromNameServer 
start:T_TestTopic
   
   [2018-Dec-12 07:29:33.760759](info):namesrvIndex is:9, index:0, 
namesrvaddrlist size:1
   
   [2018-Dec-12 07:29:34.242835](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:35.243643](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:36.244387](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:36.761118](error):GetTransport of:172.17.0.2:9876 get 
timed_mutex timeout
   
   [2018-Dec-12 07:29:37.244875](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:38.245616](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:39.246274](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:40.246906](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:41.247591](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:42.248256](info):Wait till event base is looping
   
   [2018-Dec-12 07:29:43.249143](info):Wait till event base is looping
   ```


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ShannonDing closed pull request #50: Fix push consumer dtor segfault

2019-01-03 Thread GitBox
ShannonDing closed pull request #50: Fix push consumer dtor segfault
URL: https://github.com/apache/rocketmq-client-cpp/pull/50
 
 
   

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/src/consumer/DefaultMQPushConsumer.cpp 
b/src/consumer/DefaultMQPushConsumer.cpp
index 70c9b888..96e5ec20 100644
--- a/src/consumer/DefaultMQPushConsumer.cpp
+++ b/src/consumer/DefaultMQPushConsumer.cpp
@@ -226,11 +226,21 @@ void DefaultMQPushConsumer::boost_asio_work() {
 
 DefaultMQPushConsumer::~DefaultMQPushConsumer() {
   m_pMessageListener = NULL;
-  deleteAndZero(m_pullmsgQueue);
-  deleteAndZero(m_pRebalance);
-  deleteAndZero(m_pOffsetStore);
-  deleteAndZero(m_pPullAPIWrapper);
-  deleteAndZero(m_consumerService);
+  if (m_pullmsgQueue != NULL) {
+deleteAndZero(m_pullmsgQueue);
+  }
+  if (m_pRebalance != NULL) {
+deleteAndZero(m_pRebalance);
+  }
+  if (m_pOffsetStore != NULL) {
+deleteAndZero(m_pOffsetStore);
+  }
+  if (m_pPullAPIWrapper != NULL) {
+deleteAndZero(m_pPullAPIWrapper);
+  }
+  if (m_consumerService != NULL) {
+deleteAndZero(m_consumerService);
+  }
   PullMAP::iterator it = m_PullCallback.begin();
   for (; it != m_PullCallback.end(); ++it) {
 deleteAndZero(it->second);


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ShannonDing commented on a change in pull request #51: be able to build examples with static client

2019-01-03 Thread GitBox
ShannonDing commented on a change in pull request #51: be able to build 
examples with static client
URL: https://github.com/apache/rocketmq-client-cpp/pull/51#discussion_r245191851
 
 

 ##
 File path: example/CMakeLists.txt
 ##
 @@ -49,11 +49,11 @@ foreach(file ${files})
${Boost_LIBRARIES} ${LIBEVENT_LIBRARIES} ${JSONCPP_LIBRARIES})
 endif()
 else()
-#if (BUILD_ROCKETMQ_SHARED)
+if (BUILD_ROCKETMQ_SHARED)
target_link_libraries (${basename} rocketmq_shared ${deplibs})
-#else()
-   #target_link_libraries (${basename} rocketmq_static ${deplibs})
-#endif()
+else()
+   target_link_libraries (${basename} rocketmq_static ${deplibs} 
${Boost_LIBRARIES} ${LIBEVENT_LIBRARIES} ${JSONCPP_LIBRARIES})
 
 Review comment:
   I think boost libraries, libevent, and jsonncpp library don't need to be 
linked again, as they are linked to rocketmq_static before. 
   Could you please remove "${Boost_LIBRARIES} ${LIBEVENT_LIBRARIES} 
${JSONCPP_LIBRARIES}" and have a test on it?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ShannonDing closed issue #32: error: possibly undefined macro: AC_PROG_LIBTOOL

2019-01-03 Thread GitBox
ShannonDing closed issue #32: error: possibly undefined macro: AC_PROG_LIBTOOL
URL: https://github.com/apache/rocketmq-client-cpp/issues/32
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


?????? [DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread ????
Great??






--  --
??: "huzongt...@cmss.chinamobile.com";
: 2019??1??4??(??) 10:20
??: "dev";

: : Re: [DISCUSS]The graduation of RocketMQ's golang client



Very good news.Congratulation!



huzongt...@cmss.chinamobile.com
 
 liqipeng
?? 2019-01-03 22:43
 dev
?? Re: [DISCUSS]The graduation of RocketMQ's golang client
Very good news. Hope it come soon
> ?? 2019??1??310:30??Shannon  ??
> 
> Hello RocketMQ Community,
> 
> This is the discussion for the graduation of RocketMQ??s golang client(
> https://github.com/apache/rocketmq-client-go 
> ).
> 
> RocketMQ-client-go is the golang client of Apache RocketMQ, The
> RocketMQ golang client library is built on the existing CPP client
> library and exposes almost all of the features in CPP client.
> 
> As the CPP client has been used by several companies and main features have
> been verified in their production environment, therefore, we have reason to
> believe that golang client has the same stability with CPP client. and the
> most important of all, up to now, there are 9 active contributors from 6
> organizations in the community.
> So we think it has reached the graduation standard, but in order to ensure
> the quality of the project, we still investigated the usage information of
> three companies from different industries, the information shows below:
> 1 An Express Company
>1??Environment Configuration??
>   CentOS 7
>   2) Functions
>Synchronous transmission with binlog messages
>Consume message with Pull mode
>  3??scene
>Mainly used for system decoupling, data synchronization.
>  4??Usage description
>Go SDK is relatively stable and there is no problem for the
> time being.
> 2 A technology company
>   1??Environment Configuration??
>   CentOS 6.8
>   2) Functions
>Synchronous transmission 
>Consume message with Pull mode
>   3??Usage description
> there is no problem for the time being.
> 
> 3 Database department of Alibaba
>   1??Environment Configuration??
>   Linux Core 3.10
>   2) Functions
>PushConsumer with cluster mode
>  3??scene
>Mainly used for receiving server state change information from 
> RocketMQ, so as to facilitate some automatic operation and maintenance 
> decisions.
> 
> If you have any suggestion about the graduation of the Golang client, please 
> feel free to reply to this email, we sincerely hope to get your advice.

Re: [DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread Kevin Wang
wonderful, it’s a huge progress for the multi-language client! Go! 

> 在 2019年1月3日,下午10:30,Shannon  写道:
> 
> Hello RocketMQ Community,
> 
> This is the discussion for the graduation of RocketMQ’s golang client(
> https://github.com/apache/rocketmq-client-go 
> ).
> 
> RocketMQ-client-go is the golang client of Apache RocketMQ, The
> RocketMQ golang client library is built on the existing CPP client
> library and exposes almost all of the features in CPP client.
> 
> As the CPP client has been used by several companies and main features have
> been verified in their production environment, therefore, we have reason to
> believe that golang client has the same stability with CPP client. and the
> most important of all, up to now, there are 9 active contributors from 6
> organizations in the community.
> So we think it has reached the graduation standard, but in order to ensure
> the quality of the project, we still investigated the usage information of
> three companies from different industries, the information shows below:
> 1 An Express Company
> 1)Environment Configuration:
>CentOS 7
>2) Functions
> Synchronous transmission with binlog messages
> Consume message with Pull mode
>   3)scene
> Mainly used for system decoupling, data synchronization.
>   4)Usage description
> Go SDK is relatively stable and there is no problem for the
> time being.
> 2 A technology company
>1)Environment Configuration:
>CentOS 6.8
>2) Functions
> Synchronous transmission 
> Consume message with Pull mode
>3)Usage description
>  there is no problem for the time being.
> 
> 3 Database department of Alibaba
>1)Environment Configuration:
>Linux Core 3.10
>2) Functions
> PushConsumer with cluster mode
>   3)scene
> Mainly used for receiving server state change information from 
> RocketMQ, so as to facilitate some automatic operation and maintenance 
> decisions.
> 
> If you have any suggestion about the graduation of the Golang client, please 
> feel free to reply to this email, we sincerely hope to get your advice.



[GitHub] ShannonDing opened a new pull request #22: Update Introduction for macOS

2019-01-03 Thread GitBox
ShannonDing opened a new pull request #22: Update Introduction for macOS
URL: https://github.com/apache/rocketmq-client-python/pull/22
 
 
   Update Introduction for macOS


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fusiming opened a new pull request #658: Develop

2019-01-03 Thread GitBox
fusiming opened a new pull request #658: Develop
URL: https://github.com/apache/rocketmq/pull/658
 
 
   ## What is the purpose of the change
   
   RocketMQ Developer Guide doc
   
   ## Brief changelog
   
   Add the file named BestPractice.md 
   
   ## Verifying this change
   
   no functional change
   Follow this checklist to help us incorporate your contribution quickly and 
easily. Notice, `it would be helpful if you could finish the following 5 
checklist(the last one is not necessary)before request the community to review 
your PR`.
   
   - [x] Make sure there is a [Github 
issue](https://github.com/apache/rocketmq/issues) filed for the change (usually 
before you start working on it). Trivial changes like typos do not require a 
Github issue. Your pull request should address just this issue, without pulling 
in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException 
when host config not exist`. Each commit in the pull request should have a 
meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic 
correction, more mock a little better when cross module dependency exist. If 
the new feature or significant change is committed, please remember to add 
integration-test in [test 
module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs 
checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install 
-DskipITs` to make sure unit-test pass. Run `mvn clean test-compile 
failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual 
Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fusiming commented on issue #658: Develop

2019-01-03 Thread GitBox
fusiming commented on issue #658: Develop
URL: https://github.com/apache/rocketmq/pull/658#issuecomment-451348734
 
 
   Add the file BestPractice.md


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #658: Develop

2019-01-03 Thread GitBox
coveralls commented on issue #658: Develop
URL: https://github.com/apache/rocketmq/pull/658#issuecomment-451350330
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20898766/badge)](https://coveralls.io/builds/20898766)
   
   Coverage decreased (-0.01%) to 43.112% when pulling 
**5c46048dcc28e3546c1312959d80d24b24d7f878 on develop** into 
**d4d02b5e017ebf8c7d3405516264645280cf57fa on master**.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dongeforever commented on issue #656: mqadmin queryMsgById Command IP Error

2019-01-03 Thread GitBox
dongeforever commented on issue #656: mqadmin queryMsgById Command IP Error
URL: https://github.com/apache/rocketmq/issues/656#issuecomment-451351658
 
 
   @xox9001 There maybe multi network interfaces in the host, the rocketmq 
broker will bind to one of them.
   You could use `mqadmin clusterList` to check the binded ip. 
   Alternatively, you could config the "brokerIP1" in the conf to have a 
determinate binding.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dongeforever commented on issue #653: Consumer setPullInterval is not working when pullInterval > 120 seconds

2019-01-03 Thread GitBox
dongeforever commented on issue #653: Consumer setPullInterval is not working 
when pullInterval > 120 seconds
URL: https://github.com/apache/rocketmq/issues/653#issuecomment-451352035
 
 
   @Cicizz 120 seconds is quite long enough. If you still want to slow the 
consuming speed, you may need to do some throttle in the MessageListener. 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wlliqipeng commented on a change in pull request #655: 1. Simple Example

2019-01-03 Thread GitBox
wlliqipeng commented on a change in pull request #655: 1. Simple Example
URL: https://github.com/apache/rocketmq/pull/655#discussion_r245202357
 
 

 ##
 File path: docs/cn/RocketMQ Example.md
 ##
 @@ -0,0 +1,957 @@
+样例(sample)
+
+
+## 基本样例
+
+
+在基本样例中我们提供如下的功能场景:
+
+* 使用RocketMQ发送三种类型的消息: 同步消息,异步消息和单向消息。其中前两种消息是可靠的,因为会有发送是否成功的应答。
+* 使用RocketMQ来消费接收到的消息。
+
+### 加入依赖:
+
+`maven:`
+```
+ 
+ org.apache.rocketmq
+rocketmq-client
+4.3.0  
+
+```
+`gradle`
+```
+compile 'org.apache.rocketmq:rocketmq-client:4.3.0'
+```
+### 消息发送
+
+1  Producer端发送同步消息
+
+这种可靠性同步地发送方式使用的比较广泛,比如:重要的消息通知,短信通知。
+```java
+public class SyncProducer {
+   public static void main(String[] args) throws Exception {
+   // 实例化消息生产者Producer
+DefaultMQProducer producer = new 
DefaultMQProducer("please_rename_unique_group_name");
+   // 设置NameServer的地址
+   producer.setNamesrvAddr("localhost:9876");
+   // 启动Producer实例
+producer.start();
+   for (int i = 0; i < 100; i++) {
+   // 创建消息,并指定topic, tag和消息体
+   Message msg = new Message("TopicTest" /* Topic */,
+   "TagA" /* Tag */,
+("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET) 
/* Message body */
+   );
+   // 发送消息到一个broker
+SendResult sendResult = producer.send(msg);
+// 通过sendResult返回消息是否成功送达
+   System.out.printf("%s%n", sendResult);
+   }
+   // 如果不再发送消息,关闭producer实例.
+producer.shutdown();
+   }
+}
+```
+2 发送异步消息
+
+    异步消息通常用在对应答时间敏感的业务场景,即发送端不能容忍长时间地等待broker的相应。
 
 Review comment:
   应答改成响应是否更好些


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wlliqipeng commented on a change in pull request #655: 1. Simple Example

2019-01-03 Thread GitBox
wlliqipeng commented on a change in pull request #655: 1. Simple Example
URL: https://github.com/apache/rocketmq/pull/655#discussion_r245202589
 
 

 ##
 File path: docs/cn/RocketMQ Example.md
 ##
 @@ -0,0 +1,957 @@
+样例(sample)
+
+
+## 基本样例
+
+
+在基本样例中我们提供如下的功能场景:
+
+* 使用RocketMQ发送三种类型的消息: 同步消息,异步消息和单向消息。其中前两种消息是可靠的,因为会有发送是否成功的应答。
+* 使用RocketMQ来消费接收到的消息。
+
+### 加入依赖:
+
+`maven:`
+```
+ 
+ org.apache.rocketmq
+rocketmq-client
+4.3.0  
+
+```
+`gradle`
+```
+compile 'org.apache.rocketmq:rocketmq-client:4.3.0'
+```
+### 消息发送
+
+1  Producer端发送同步消息
+
+这种可靠性同步地发送方式使用的比较广泛,比如:重要的消息通知,短信通知。
+```java
+public class SyncProducer {
+   public static void main(String[] args) throws Exception {
+   // 实例化消息生产者Producer
+DefaultMQProducer producer = new 
DefaultMQProducer("please_rename_unique_group_name");
+   // 设置NameServer的地址
+   producer.setNamesrvAddr("localhost:9876");
+   // 启动Producer实例
+producer.start();
+   for (int i = 0; i < 100; i++) {
+   // 创建消息,并指定topic, tag和消息体
+   Message msg = new Message("TopicTest" /* Topic */,
+   "TagA" /* Tag */,
+("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET) 
/* Message body */
+   );
+   // 发送消息到一个broker
+SendResult sendResult = producer.send(msg);
+// 通过sendResult返回消息是否成功送达
+   System.out.printf("%s%n", sendResult);
+   }
+   // 如果不再发送消息,关闭producer实例.
+producer.shutdown();
+   }
+}
+```
+2 发送异步消息
+
 
 Review comment:
   最后两个字“相应”


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wlliqipeng commented on a change in pull request #655: 1. Simple Example

2019-01-03 Thread GitBox
wlliqipeng commented on a change in pull request #655: 1. Simple Example
URL: https://github.com/apache/rocketmq/pull/655#discussion_r245202678
 
 

 ##
 File path: docs/cn/RocketMQ Example.md
 ##
 @@ -0,0 +1,957 @@
+样例(sample)
+
+
+## 基本样例
+
+
+在基本样例中我们提供如下的功能场景:
+
+* 使用RocketMQ发送三种类型的消息: 同步消息,异步消息和单向消息。其中前两种消息是可靠的,因为会有发送是否成功的应答。
+* 使用RocketMQ来消费接收到的消息。
+
+### 加入依赖:
+
+`maven:`
+```
+ 
+ org.apache.rocketmq
+rocketmq-client
+4.3.0  
+
+```
+`gradle`
+```
+compile 'org.apache.rocketmq:rocketmq-client:4.3.0'
+```
+### 消息发送
+
+1  Producer端发送同步消息
+
+这种可靠性同步地发送方式使用的比较广泛,比如:重要的消息通知,短信通知。
+```java
+public class SyncProducer {
+   public static void main(String[] args) throws Exception {
+   // 实例化消息生产者Producer
+DefaultMQProducer producer = new 
DefaultMQProducer("please_rename_unique_group_name");
+   // 设置NameServer的地址
+   producer.setNamesrvAddr("localhost:9876");
+   // 启动Producer实例
+producer.start();
+   for (int i = 0; i < 100; i++) {
+   // 创建消息,并指定topic, tag和消息体
+   Message msg = new Message("TopicTest" /* Topic */,
+   "TagA" /* Tag */,
+("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET) 
/* Message body */
+   );
+   // 发送消息到一个broker
+SendResult sendResult = producer.send(msg);
+// 通过sendResult返回消息是否成功送达
+   System.out.printf("%s%n", sendResult);
+   }
+   // 如果不再发送消息,关闭producer实例.
+producer.shutdown();
+   }
+}
+```
+2 发送异步消息
+
+    异步消息通常用在对应答时间敏感的业务场景,即发送端不能容忍长时间地等待broker的相应。
+
+```java
+public class AsyncProducer {
+   public static void main(String[] args) throws Exception {
+   // 实例化消息生产者Producer
+DefaultMQProducer producer = new 
DefaultMQProducer("please_rename_unique_group_name");
+   // 设置NameServer的地址
+producer.setNamesrvAddr("localhost:9876");
+   // 启动Producer实例
+producer.start();
+producer.setRetryTimesWhenSendAsyncFailed(0);
+   for (int i = 0; i < 100; i++) {
+final int index = i;
+   // 创建消息,并指定topic, tag和消息体
+Message msg = new Message("TopicTest",
+"TagA",
+"OrderID188",
+"Hello world".getBytes(RemotingHelper.DEFAULT_CHARSET));
+// SendCallback接收异步返回结果的回调
+producer.send(msg, new SendCallback() {
+@Override
+public void onSuccess(SendResult sendResult) {
+System.out.printf("%-10d OK %s %n", index,
+sendResult.getMsgId());
+}
+@Override
+public void onException(Throwable e) {
+ System.out.printf("%-10d Exception %s %n", index, e);
+ e.printStackTrace();
+}
+   });
+   }
+   // 如果不再发送消息,关闭producer实例.
+producer.shutdown();
+   }
+}
+```
+
+3 单向发送消息
+
+这种方式主要用在不特别关系发送结果的场景,例如日志发送。
 
 Review comment:
   “关系”?“关心”


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] vongosling closed pull request #22: Update Introduction for macOS

2019-01-03 Thread GitBox
vongosling closed pull request #22: Update Introduction for macOS
URL: https://github.com/apache/rocketmq-client-python/pull/22
 
 
   

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/doc/Introduction.md b/doc/Introduction.md
index 628079e..e26239e 100644
--- a/doc/Introduction.md
+++ b/doc/Introduction.md
@@ -1,13 +1,13 @@
 --
 ## RocketMQ Client Python
 
-### 1. Python Version
-* python 2.7.x
+### 1. Python Runtime Version
+* python 2.7.x 
 
 
-### 2. Dependency
+### 2. Dependency of Python Client
 
-* [librocketmq](https://github.com/apache/rocketmq-client-cpp) 
+* CPP Core: [librocketmq](https://github.com/apache/rocketmq-client-cpp)   
 * python-devel 2.7.x
 * boost-python 1.58.0
   
@@ -38,17 +38,17 @@
   
- make and install the RocketMQ library manually from 
[rocketmq-client-cpp](https://github.com/apache/rocketmq-client-cpp)
  
-   - quick install
+   - quick install, please choose the suitable dynamic library version for 
your system.
```
mkdir rocketmqlib
cd rocketmqlib
-   wget 
https://opensource-rocketmq-client.oss-cn-hangzhou.aliyuncs.com/cpp-client/linux/1.0.2/RHEL7.x/librocketmq.tar.gz
+   wget 
https://opensource-rocketmq-client.oss-cn-hangzhou.aliyuncs.com/cpp-client/linux/1.2.0/RHEL7.x/librocketmq.tar.gz
tar -xzf librocketmq.tar.gz
sudo cp librocketmq.so librocketmq.a /usr/local/lib/
sudo cp -r rocketmq /usr/local/include/
```

-  
+ 
 * Make and install module manually
1. Using Dynamic RocketMQ and boost python libraries are recommended.
   ```
@@ -69,7 +69,64 @@
```
strings librocketmqclientpython.so |grep PYTHON_CLIENT_VERSION
```
+ macOS Mojave 10.14.2
+* Install compile tools:
+```
+- brew install make
+- brew install cmake
+- sbrew install gcc-c++
+```
+* Install dependency:
+ 
+1. python-devel
+   ```
+   brew install python-devel
+   ```
+
+2. zlib-devel
+   ```
+   brew install zlib-devel
+   ```
+3. boost-python
+   ```
+   sh install_boostpython.sh
+   ```
+4. [librocketmq](https://github.com/apache/rocketmq-client-cpp), choose 
one method below:
+  
+   - make and install the RocketMQ library manually from 
[rocketmq-client-cpp](https://github.com/apache/rocketmq-client-cpp)
+ 
+   - quick install
+   ```
+   mkdir rocketmqlib
+   cd rocketmqlib
+   wget 
https://opensource-rocketmq-client.oss-cn-hangzhou.aliyuncs.com/cpp-client/mac/1.2.0/librocketmq.tar.gz
+   tar -xzf librocketmq.tar.gz
+   cp librocketmq.dylib librocketmq.a /usr/local/lib/
+   cp -r rocketmq /usr/local/include/
+   ```

+ 
+* Make and install module manually
+   1. Using Dynamic RocketMQ and boost python libraries are recommended.
+  ```
+  - mkdir build && cd build
+  - cmake ../ -DBoost_USE_STATIC_LIBS=OFF -DROCKETMQ_USE_STATIC_LIBS=OFF
+  - make
+  - make install
+  ```
+  
+   2. Also you can using static libraries.
+  ```
+ - mkdir build & cd build
+ - cmake ../ -DBoost_USE_STATIC_LIBS=ON -DROCKETMQ_USE_STATIC_LIBS=ON
+ - make
+ - make install
+  ```
+* Check verion
+   ```
+   strings librocketmqclientpython.so |grep PYTHON_CLIENT_VERSION
+   ```
+
 --
 ## How to use
 - set LD_LIBRARY_PATH


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dongeforever commented on issue #647: Producer 经常报RemotingTimeoutException wait response on channel<:10909> timeout, 3000(ms)

2019-01-03 Thread GitBox
dongeforever commented on issue #647: Producer 经常报RemotingTimeoutException wait 
response on channel<:10909> timeout, 3000(ms)
URL: https://github.com/apache/rocketmq/issues/647#issuecomment-451352874
 
 
   @liuluo129 Make the waitTimeMillsInSendQueue is smaller than 3000 and you 
may get another error 'TIMEOUT_CLEAN_QUEUE'.
   It seems a performance issue.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dongeforever commented on issue #643: netty bug CPU 100%

2019-01-03 Thread GitBox
dongeforever commented on issue #643: netty bug CPU 100%
URL: https://github.com/apache/rocketmq/issues/643#issuecomment-451353046
 
 
   @davidpdw It is welcome submitting a PR to fix it.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dongeforever commented on issue #658: Develop

2019-01-03 Thread GitBox
dongeforever commented on issue #658: Develop
URL: https://github.com/apache/rocketmq/pull/658#issuecomment-451353571
 
 
   @fusiming Please polish the name to describe the purpose of this PR


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:
us...@infra.apache.org


With regards,
Apache Git Services


[VOTE] RocketMQ-client-go 1.2.0 Release And Graduation

2019-01-03 Thread Shannon
Hello RocketMQ Community,

This is the vote for the 1.2.0 release and the graduation of Apache 
RocketMQ-client-go.

Github repo: https://github.com/apache/rocketmq-client-go

The version released this time is the first initial golang client of rocketmq. 
It is based on the kernel of the CPP client and uses cgo to encapsulate the API 
Implementation of C. You can import go package with go get command. 
The current version provides the following functions: 
1.support reliable synchronous sending of messages;
2.support reliable orderly sending of messages;
3.support reliable push consumption model;
4.support default cluster consumption;
5.support delayed messages;
6.support reliable pull consumption model;
7.support custom message properties;
8.support message Compression.
9.support oneway sending of messages;
The vote will be open for at least 72 hours or until a necessary number of 
votes are reached.

Please vote accordingly:

[ ] +1 approve 
[ ] +0 no opinion 
[ ] -1 disapprove with the reason

Thanks,
The Apache RocketMQ Team


[GitHub] duhenglucky commented on issue #633: [ISSUE #598] Enhance transaction by putting messages that exceed max check times to system topic

2019-01-03 Thread GitBox
duhenglucky commented on issue #633: [ISSUE #598] Enhance transaction by 
putting messages that exceed max check times to system topic
URL: https://github.com/apache/rocketmq/pull/633#issuecomment-451357782
 
 
   @xiangwangcheng please rebase first and make sure this PR only contains your 
commit history.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] duhenglucky commented on issue #658: Develop

2019-01-03 Thread GitBox
duhenglucky commented on issue #658: Develop
URL: https://github.com/apache/rocketmq/pull/658#issuecomment-451358876
 
 
   @hutu92 it would be very nice if you could rebase first and make sure this 
PR only contains your commits history.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] fusiming opened a new pull request #659: Add the file named best_practice.md

2019-01-03 Thread GitBox
fusiming opened a new pull request #659: Add the file named best_practice.md
URL: https://github.com/apache/rocketmq/pull/659
 
 
   ## What is the purpose of the change
   
   RocketMQ Developer Guide doc
   
   ## Brief changelog
   
   Add the file named best_practice.md
   
   ## Verifying this change
   
   no functional change
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily. Notice, `it would be helpful if you could finish the following 5 
checklist(the last one is not necessary)before request the community to review 
your PR`.
   
   - [x] Make sure there is a [Github 
issue](https://github.com/apache/rocketmq/issues) filed for the change (usually 
before you start working on it). Trivial changes like typos do not require a 
Github issue. Your pull request should address just this issue, without pulling 
in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException 
when host config not exist`. Each commit in the pull request should have a 
meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic 
correction, more mock a little better when cross module dependency exist. If 
the new feature or significant change is committed, please remember to add 
integration-test in [test 
module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs 
checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install 
-DskipITs` to make sure unit-test pass. Run `mvn clean test-compile 
failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual 
Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] duhenglucky edited a comment on issue #658: Develop

2019-01-03 Thread GitBox
duhenglucky edited a comment on issue #658: Develop
URL: https://github.com/apache/rocketmq/pull/658#issuecomment-451358876
 
 
   @hutu92 it would be very nice if you could rebase first and make sure this 
PR only contains your commits history. and please pull this PR to develop 
branch.


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:
us...@infra.apache.org


With regards,
Apache Git Services


??????[DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread ????
Celebrate RocketMQ Client's more comprehensive ecology




--  --
??: "Shannon"; 
: 2019??1??3??(??) 10:30
??: "dev"; 
: "users"; 
: [DISCUSS]The graduation of RocketMQ's golang client



Hello RocketMQ Community,


This is the discussion for the graduation of RocketMQ??s golang client(
https://github.com/apache/rocketmq-client-go).


RocketMQ-client-go is the golang client of Apache RocketMQ, The
RocketMQ golang client library is built on the existing CPP client
library and exposes almost all of the features in CPP client.


As the CPP client has been used by several companies and main features have
been verified in their production environment, therefore, we have reason to
believe that golang client has the same stability with CPP client. and the
most important of all, up to now, there are 9 active contributors from 6
organizations in the community.
So we think it has reached the graduation standard, but in order to ensure
the quality of the project, we still investigated the usage information of
three companies from different industries, the information shows below:
1 An Express Company
1??Environment Configuration??
   CentOS 7
   2) Functions
Synchronous transmission with binlog messages
Consume message with Pull mode
  3??scene
Mainly used for system decoupling, data synchronization.
  4??Usage description
Go SDK is relatively stable and there is no problem for the
time being.
2 A technology company
   1??Environment Configuration??
   CentOS 6.8
   2) Functions
Synchronous transmission 
Consume message with Pull mode
   3??Usage description
 there is no problem for the time being.


3 Database department of Alibaba
   1??Environment Configuration??
   Linux Core 3.10
   2) Functions
PushConsumer with cluster mode
  3??scene
Mainly used for receiving server state change information from 
RocketMQ, so as to facilitate some automatic operation and maintenance 
decisions.


If you have any suggestion about the graduation of the Golang client, please 
feel free to reply to this email, we sincerely hope to get your advice.

Re:[VOTE] RocketMQ-client-go 1.2.0 Release And Graduation

2019-01-03 Thread ????
+1 




-- Original --
From: "Shannon"; 
Date: 2019??1??4??(??) 1:15
To: "dev"; 
Cc: "users"; 
Subject: [VOTE] RocketMQ-client-go 1.2.0 Release And Graduation



Hello RocketMQ Community,

This is the vote for the 1.2.0 release and the graduation of Apache 
RocketMQ-client-go.

Github repo: https://github.com/apache/rocketmq-client-go

The version released this time is the first initial golang client of rocketmq. 
It is based on the kernel of the CPP client and uses cgo to encapsulate the API 
Implementation of C. You can import go package with go get command. 
The current version provides the following functions: 
1.support reliable synchronous sending of messages;
2.support reliable orderly sending of messages;
3.support reliable push consumption model;
4.support default cluster consumption;
5.support delayed messages;
6.support reliable pull consumption model;
7.support custom message properties;
8.support message Compression.
9.support oneway sending of messages;
The vote will be open for at least 72 hours or until a necessary number of 
votes are reached.

Please vote accordingly:

[ ] +1 approve 
[ ] +0 no opinion 
[ ] -1 disapprove with the reason

Thanks,
The Apache RocketMQ Team

Re: [VOTE] RocketMQ-client-go 1.2.0 Release And Graduation

2019-01-03 Thread ????
+1






-- Original --
From:  "Shannon";
Date:  Fri, Jan 4, 2019 01:15 PM
To:  "dev@rocketmq.apache.org";
Cc:  "us...@rocketmq.apache.org"; 
Subject:  [VOTE] RocketMQ-client-go 1.2.0 Release And Graduation



Hello RocketMQ Community,

This is the vote for the 1.2.0 release and the graduation of Apache 
RocketMQ-client-go.

Github repo: https://github.com/apache/rocketmq-client-go

The version released this time is the first initial golang client of rocketmq. 
It is based on the kernel of the CPP client and uses cgo to encapsulate the API 
Implementation of C. You can import go package with go get command. 
The current version provides the following functions: 
1.support reliable synchronous sending of messages;
2.support reliable orderly sending of messages;
3.support reliable push consumption model;
4.support default cluster consumption;
5.support delayed messages;
6.support reliable pull consumption model;
7.support custom message properties;
8.support message Compression.
9.support oneway sending of messages;
The vote will be open for at least 72 hours or until a necessary number of 
votes are reached.

Please vote accordingly:

[ ] +1 approve 
[ ] +0 no opinion 
[ ] -1 disapprove with the reason

Thanks,
The Apache RocketMQ Team

Re: [VOTE] RocketMQ-client-go 1.2.0 Release And Graduation

2019-01-03 Thread wenfeng wang
+1

笑道 <14106...@qq.com> 于2019年1月4日周五 下午2:09写道:

> +1
>
>
>
>
>
>
> -- Original --
> From:  "Shannon";
> Date:  Fri, Jan 4, 2019 01:15 PM
> To:  "dev@rocketmq.apache.org";
> Cc:  "us...@rocketmq.apache.org";
> Subject:  [VOTE] RocketMQ-client-go 1.2.0 Release And Graduation
>
>
>
> Hello RocketMQ Community,
>
> This is the vote for the 1.2.0 release and the graduation of Apache
> RocketMQ-client-go.
>
> Github repo: https://github.com/apache/rocketmq-client-go
>
> The version released this time is the first initial golang client of
> rocketmq. It is based on the kernel of the CPP client and uses cgo to
> encapsulate the API Implementation of C. You can import go package with go
> get command.
> The current version provides the following functions:
> 1.support reliable synchronous sending of messages;
> 2.support reliable orderly sending of messages;
> 3.support reliable push consumption model;
> 4.support default cluster consumption;
> 5.support delayed messages;
> 6.support reliable pull consumption model;
> 7.support custom message properties;
> 8.support message Compression.
> 9.support oneway sending of messages;
> The vote will be open for at least 72 hours or until a necessary number of
> votes are reached.
>
> Please vote accordingly:
>
> [ ] +1 approve
> [ ] +0 no opinion
> [ ] -1 disapprove with the reason
>
> Thanks,
> The Apache RocketMQ Team


[GitHub] coveralls commented on issue #659: Add the file named best_practice.md

2019-01-03 Thread GitBox
coveralls commented on issue #659: Add the file named best_practice.md
URL: https://github.com/apache/rocketmq/pull/659#issuecomment-451361069
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20899408/badge)](https://coveralls.io/builds/20899408)
   
   Coverage increased (+0.07%) to 43.198% when pulling 
**7bec010ac64d6b193329b89b74f1041a287467e9 on fusiming:master** into 
**d4d02b5e017ebf8c7d3405516264645280cf57fa on apache:master**.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


Re: [VOTE] RocketMQ-client-go 1.2.0 Release And Graduation

2019-01-03 Thread Kevin Wang
+1  Go!


> 在 2019年1月4日,下午1:15,Shannon  写道:
> 
> Hello RocketMQ Community,
> 
> This is the vote for the 1.2.0 release and the graduation of Apache 
> RocketMQ-client-go.
> 
> Github repo: https://github.com/apache/rocketmq-client-go
> 
> The version released this time is the first initial golang client of 
> rocketmq. It is based on the kernel of the CPP client and uses cgo to 
> encapsulate the API Implementation of C. You can import go package with go 
> get command. 
> The current version provides the following functions: 
> 1.support reliable synchronous sending of messages;
> 2.support reliable orderly sending of messages;
> 3.support reliable push consumption model;
> 4.support default cluster consumption;
> 5.support delayed messages;
> 6.support reliable pull consumption model;
> 7.support custom message properties;
> 8.support message Compression.
> 9.support oneway sending of messages;
> The vote will be open for at least 72 hours or until a necessary number of 
> votes are reached.
> 
> Please vote accordingly:
> 
> [ ] +1 approve 
> [ ] +0 no opinion 
> [ ] -1 disapprove with the reason
> 
> Thanks,
> The Apache RocketMQ Team



[GitHub] coveralls edited a comment on issue #633: [ISSUE #598] Enhance transaction by putting messages that exceed max check times to system topic

2019-01-03 Thread GitBox
coveralls edited a comment on issue #633: [ISSUE #598] Enhance transaction by 
putting messages that exceed max check times to system topic
URL: https://github.com/apache/rocketmq/pull/633#issuecomment-449861796
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20899451/badge)](https://coveralls.io/builds/20899451)
   
   Coverage increased (+0.05%) to 43.187% when pulling 
**50341363f1133af16571ea451bbc84a3f4605306 on 
xiangwangcheng:enhance_transaction** into 
**5c46048dcc28e3546c1312959d80d24b24d7f878 on apache:develop**.
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


Re: [VOTE] RocketMQ-client-go 1.2.0 Release And Graduation

2019-01-03 Thread yukon
+1

On Fri, Jan 4, 2019 at 2:15 PM Kevin Wang  wrote:

> +1  Go!
>
>
> > 在 2019年1月4日,下午1:15,Shannon  写道:
> >
> > Hello RocketMQ Community,
> >
> > This is the vote for the 1.2.0 release and the graduation of Apache
> RocketMQ-client-go.
> >
> > Github repo: https://github.com/apache/rocketmq-client-go
> >
> > The version released this time is the first initial golang client of
> rocketmq. It is based on the kernel of the CPP client and uses cgo to
> encapsulate the API Implementation of C. You can import go package with go
> get command.
> > The current version provides the following functions:
> > 1.support reliable synchronous sending of messages;
> > 2.support reliable orderly sending of messages;
> > 3.support reliable push consumption model;
> > 4.support default cluster consumption;
> > 5.support delayed messages;
> > 6.support reliable pull consumption model;
> > 7.support custom message properties;
> > 8.support message Compression.
> > 9.support oneway sending of messages;
> > The vote will be open for at least 72 hours or until a necessary number
> of votes are reached.
> >
> > Please vote accordingly:
> >
> > [ ] +1 approve
> > [ ] +0 no opinion
> > [ ] -1 disapprove with the reason
> >
> > Thanks,
> > The Apache RocketMQ Team
>
>


Re: [DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread heng du
As there are more than 3 companies has been used in their production
environment, so I think it has been reached the graduation standard for
Apache RocketMQ.

老胡 <2372554...@qq.com> 于2019年1月4日周五 下午2:02写道:

> Celebrate RocketMQ Client's more comprehensive ecology
>
>
> -- 原始邮件 --
> *发件人:* "Shannon";
> *发送时间:* 2019年1月3日(星期四) 晚上10:30
> *收件人:* "dev";
> *抄送:* "users";
> *主题:* [DISCUSS]The graduation of RocketMQ's golang client
>
> Hello RocketMQ Community,
>
> This is the discussion for the graduation of RocketMQ’s golang client(
> https://github.com/apache/rocketmq-client-go).
>
> RocketMQ-client-go is the golang client of Apache RocketMQ, The
> RocketMQ golang client library is built on the existing CPP client
> library and exposes almost all of the features in CPP client.
>
> As the CPP client has been used by several companies and main features have
> been verified in their production environment, therefore, we have reason
> to
> believe that golang client has the same stability with CPP client. and the
> most important of all, up to now, there are 9 active contributors from 6
> organizations in the community.
> So we think it has reached the graduation standard, but in order to ensure
> the quality of the project, we still investigated the usage information of
> three companies from different industries, the information shows below:
> 1 An Express Company
> 1)Environment Configuration:
>CentOS 7
>2) Functions
> Synchronous transmission with binlog messages
> Consume message with Pull mode
>   3)scene
> Mainly used for system decoupling, data synchronization.
>   4)Usage description
> Go SDK is relatively stable and there is no problem for the
> time being.
> 2 A technology company
>1)Environment Configuration:
>CentOS 6.8
>2) Functions
> Synchronous transmission
> Consume message with Pull mode
>3)Usage description
>  there is no problem for the time being.
>
> 3 Database department of Alibaba
>1)Environment Configuration:
>Linux Core 3.10
>2) Functions
> PushConsumer with cluster mode
>   3)scene
> Mainly used for receiving server state change information from
> RocketMQ, so as to facilitate some automatic operation and maintenance
> decisions.
>
> If you have any suggestion about the graduation of the Golang client,
> please feel free to reply to this email, we sincerely hope to get your
> advice.
>


Re: [VOTE] RocketMQ-client-go 1.2.0 Release And Graduation

2019-01-03 Thread heng du
+1

yukon  于2019年1月4日周五 下午2:23写道:

> +1
>
> On Fri, Jan 4, 2019 at 2:15 PM Kevin Wang  wrote:
>
>> +1  Go!
>>
>>
>> > 在 2019年1月4日,下午1:15,Shannon  写道:
>> >
>> > Hello RocketMQ Community,
>> >
>> > This is the vote for the 1.2.0 release and the graduation of Apache
>> RocketMQ-client-go.
>> >
>> > Github repo: https://github.com/apache/rocketmq-client-go
>> >
>> > The version released this time is the first initial golang client of
>> rocketmq. It is based on the kernel of the CPP client and uses cgo to
>> encapsulate the API Implementation of C. You can import go package with go
>> get command.
>> > The current version provides the following functions:
>> > 1.support reliable synchronous sending of messages;
>> > 2.support reliable orderly sending of messages;
>> > 3.support reliable push consumption model;
>> > 4.support default cluster consumption;
>> > 5.support delayed messages;
>> > 6.support reliable pull consumption model;
>> > 7.support custom message properties;
>> > 8.support message Compression.
>> > 9.support oneway sending of messages;
>> > The vote will be open for at least 72 hours or until a necessary number
>> of votes are reached.
>> >
>> > Please vote accordingly:
>> >
>> > [ ] +1 approve
>> > [ ] +0 no opinion
>> > [ ] -1 disapprove with the reason
>> >
>> > Thanks,
>> > The Apache RocketMQ Team
>>
>>


Re: [DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread Gosling Von
Hi,

It would be helpful if we could summarize before voting :-)

Best Regards,
Von Gosling

> 在 2019年1月3日,下午10:30,Shannon  写道:
> 
> Hello RocketMQ Community,
> 
> This is the discussion for the graduation of RocketMQ’s golang client(
> https://github.com/apache/rocketmq-client-go 
> ).
> 
> RocketMQ-client-go is the golang client of Apache RocketMQ, The
> RocketMQ golang client library is built on the existing CPP client
> library and exposes almost all of the features in CPP client.
> 
> As the CPP client has been used by several companies and main features have
> been verified in their production environment, therefore, we have reason to
> believe that golang client has the same stability with CPP client. and the
> most important of all, up to now, there are 9 active contributors from 6
> organizations in the community.
> So we think it has reached the graduation standard, but in order to ensure
> the quality of the project, we still investigated the usage information of
> three companies from different industries, the information shows below:
> 1 An Express Company
> 1)Environment Configuration:
>CentOS 7
>2) Functions
> Synchronous transmission with binlog messages
> Consume message with Pull mode
>   3)scene
> Mainly used for system decoupling, data synchronization.
>   4)Usage description
> Go SDK is relatively stable and there is no problem for the
> time being.
> 2 A technology company
>1)Environment Configuration:
>CentOS 6.8
>2) Functions
> Synchronous transmission 
> Consume message with Pull mode
>3)Usage description
>  there is no problem for the time being.
> 
> 3 Database department of Alibaba
>1)Environment Configuration:
>Linux Core 3.10
>2) Functions
> PushConsumer with cluster mode
>   3)scene
> Mainly used for receiving server state change information from 
> RocketMQ, so as to facilitate some automatic operation and maintenance 
> decisions.
> 
> If you have any suggestion about the graduation of the Golang client, please 
> feel free to reply to this email, we sincerely hope to get your advice.



[GitHub] xiangwangcheng commented on issue #633: [ISSUE #598] Enhance transaction by putting messages that exceed max check times to system topic

2019-01-03 Thread GitBox
xiangwangcheng commented on issue #633: [ISSUE #598] Enhance transaction by 
putting messages that exceed max check times to system topic
URL: https://github.com/apache/rocketmq/pull/633#issuecomment-451362850
 
 
   @duhenglucky I already did rebase and now the commit history is much better.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zongtanghu commented on a change in pull request #651: [ISSUE#403] fix acl config file watch bug, clean and optimize the codes for acl feature.

2019-01-03 Thread GitBox
zongtanghu commented on a change in pull request #651: [ISSUE#403] fix acl 
config file watch bug,clean and optimize the codes for acl feature.
URL: https://github.com/apache/rocketmq/pull/651#discussion_r245221440
 
 

 ##
 File path: 
acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionLoader.java
 ##
 @@ -77,92 +75,52 @@ public void initialize() {
 JSONArray globalWhiteRemoteAddressesList = 
plainAclConfData.getJSONArray("globalWhiteRemoteAddresses");
 if (globalWhiteRemoteAddressesList != null && 
!globalWhiteRemoteAddressesList.isEmpty()) {
 for (int i = 0; i < globalWhiteRemoteAddressesList.size(); i++) {
-
addGlobalWhiteRemoteAddress(globalWhiteRemoteAddressesList.getString(i));
+
globalWhiteRemoteAddressStrategy.add(remoteAddressStrategyFactory.
+
getRemoteAddressStrategy(globalWhiteRemoteAddressesList.getString(i)));
 }
 }
 
 JSONArray accounts = plainAclConfData.getJSONArray("accounts");
 if (accounts != null && !accounts.isEmpty()) {
-List plainAccessList = 
accounts.toJavaList(PlainAccessConfig.class);
-for (PlainAccessConfig plainAccess : plainAccessList) {
-
this.addPlainAccessResource(getPlainAccessResource(plainAccess));
+List plainAccessConfigList = 
accounts.toJavaList(PlainAccessConfig.class);
+for (PlainAccessConfig plainAccessConfig : plainAccessConfigList) {
+PlainAccessResource plainAccessResource = 
buildPlainAccessResource(plainAccessConfig);
+
plainAccessResourceMap.put(plainAccessResource.getAccessKey(),plainAccessResource);
 }
 }
-}
 
-private void watch() {
-String version = System.getProperty("java.version");
-String[] str = StringUtils.split(version, ".");
-if (Integer.valueOf(str[1]) < 7) {
-log.warn("Watch need jdk equal or greater than 1.7, current 
version is {}", str[1]);
-return;
+this.lock.writeLock().lock();
+try {
 
 Review comment:
   Hi @dongeforever we have already fixed the lock issue,please review the 
code,again.Thanks!


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] liuluo129 commented on issue #647: Producer 经常报RemotingTimeoutException wait response on channel<:10909> timeout, 3000(ms)

2019-01-03 Thread GitBox
liuluo129 commented on issue #647: Producer 经常报RemotingTimeoutException wait 
response on channel<:10909> timeout, 3000(ms)
URL: https://github.com/apache/rocketmq/issues/647#issuecomment-451365559
 
 
   > @liuluo129 Make the waitTimeMillsInSendQueue is smaller than 3000 and you 
may get another error 'TIMEOUT_CLEAN_QUEUE'.
   
   
多谢回复,我再补充一些信息,出现超时的时候,并不是高峰期,而且只会在其中一台超时,观察两台机器的cpu,io,网络和日志,没发现有什么异常点,如果是性能问题,该如何排查呢


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ShannonDing opened a new pull request #22: Add NOTICE

2019-01-03 Thread GitBox
ShannonDing opened a new pull request #22: Add NOTICE
URL: https://github.com/apache/rocketmq-client-go/pull/22
 
 
   Add NOTICE


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ShannonDing closed pull request #22: Add NOTICE

2019-01-03 Thread GitBox
ShannonDing closed pull request #22: Add NOTICE
URL: https://github.com/apache/rocketmq-client-go/pull/22
 
 
   

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/NOTICE b/NOTICE
new file mode 100644
index 000..703c28b
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Apache RocketMQ
+Copyright 2016-2018 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ShannonDing opened a new pull request #23: Update SDK Version and changelog

2019-01-03 Thread GitBox
ShannonDing opened a new pull request #23: Update SDK Version and changelog
URL: https://github.com/apache/rocketmq-client-go/pull/23
 
 
   
   Update SDK Version and changelog


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] vongosling closed pull request #23: Update SDK Version and changelog

2019-01-03 Thread GitBox
vongosling closed pull request #23: Update SDK Version and changelog
URL: https://github.com/apache/rocketmq-client-go/pull/23
 
 
   

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/NOTICE b/NOTICE
new file mode 100644
index 000..703c28b
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Apache RocketMQ
+Copyright 2016-2018 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/README.md b/README.md
index f49b495..71244fd 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,10 @@
 ## Features
 At present, this SDK supports
 * sending message in synchronous mode
+* sending message in orderly mode
+* sending message in oneway mode
 * consuming message using push model
+* consuming message using pull model
 
 --
 ## How to use
diff --git a/changelog b/changelog
index 2a23ffc..3ca5cb3 100755
--- a/changelog
+++ b/changelog
@@ -1,3 +1,14 @@
+version 1.2.0
+ * support reliable synchronous sending of messages;
+ * support reliable orderly sending of messages;
+ * support reliable push consumption model;
+ * support default cluster consumption;
+ * support delayed messages;
+ * support reliable pull consumption model;
+ * support custom message properties;
+ * support message Compression.
+ * support oneway sending of messages.
+
 version 1.0.0 @2018.10.29
  * Initialize version of Go client.
 
diff --git a/core/version.go b/core/version.go
index 4ac86d5..95ff0f3 100644
--- a/core/version.go
+++ b/core/version.go
@@ -16,7 +16,7 @@
  */
 package rocketmq
 
-const GoClientVersion = "Go Client V1.0.0, BuildTime:2018.10.30"
+const GoClientVersion = "Go Client V1.2.0, Support CPP Core:V1.2.X"
 
 func GetVersion() (version string) {
return GoClientVersion


 


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:
us...@infra.apache.org


With regards,
Apache Git Services


Re: [DISCUSS]The graduation of RocketMQ's golang client

2019-01-03 Thread Cui Jonah
Hi, All
Very good news. I come from a children's education company. Recently, our 
business system integrates golang's client and runs on trial. The daily average 
QPS is about 500. We mainly use SendMessagge and ConstumeWithPull interfaces. 
Generally speaking, it runs stably and the interface is very simple to use.

Best Regards.


On [DATE], "[NAME]" <[ADDRESS]> wrote:

Hi,

It would be helpful if we could summarize before voting :-)

Best Regards,
Von Gosling

> 在 2019年1月3日,下午10:30,Shannon  写道:
> 
> Hello RocketMQ Community,
> 
> This is the discussion for the graduation of RocketMQ’s golang client(
> https://github.com/apache/rocketmq-client-go 
).
> 
> RocketMQ-client-go is the golang client of Apache RocketMQ, The
> RocketMQ golang client library is built on the existing CPP client
> library and exposes almost all of the features in CPP client.
> 
> As the CPP client has been used by several companies and main features 
have
> been verified in their production environment, therefore, we have reason 
to
> believe that golang client has the same stability with CPP client. and the
> most important of all, up to now, there are 9 active contributors from 6
> organizations in the community.
> So we think it has reached the graduation standard, but in order to ensure
> the quality of the project, we still investigated the usage information of
> three companies from different industries, the information shows below:
> 1 An Express Company
> 1)Environment Configuration:
>CentOS 7
>2) Functions
> Synchronous transmission with binlog messages
> Consume message with Pull mode
>   3)scene
> Mainly used for system decoupling, data synchronization.
>   4)Usage description
> Go SDK is relatively stable and there is no problem for the
> time being.
> 2 A technology company
>1)Environment Configuration:
>CentOS 6.8
>2) Functions
> Synchronous transmission 
> Consume message with Pull mode
>3)Usage description
>  there is no problem for the time being.
> 
> 3 Database department of Alibaba
>1)Environment Configuration:
>Linux Core 3.10
>2) Functions
> PushConsumer with cluster mode
>   3)scene
> Mainly used for receiving server state change information from 
RocketMQ, so as to facilitate some automatic operation and maintenance 
decisions.
> 
> If you have any suggestion about the graduation of the Golang client, 
please feel free to reply to this email, we sincerely hope to get your advice.





[GitHub] hutu92 commented on issue #658: Develop

2019-01-03 Thread GitBox
hutu92 commented on issue #658: Develop
URL: https://github.com/apache/rocketmq/pull/658#issuecomment-451372457
 
 
   > @hutu92 it would be very nice if you could rebase first and make sure this 
PR only contains your commits history. and please pull this PR to develop 
branch.
   
   What do you mean, what do you need me to do? I don't know.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Cicizz commented on issue #653: Consumer setPullInterval is not working when pullInterval > 120 seconds

2019-01-03 Thread GitBox
Cicizz commented on issue #653: Consumer setPullInterval is not working when 
pullInterval > 120 seconds
URL: https://github.com/apache/rocketmq/issues/653#issuecomment-451374501
 
 
   OK,thanks


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:
us...@infra.apache.org


With regards,
Apache Git Services