You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2021/11/11 10:15:05 UTC

[GitHub] [incubator-eventmesh] wangshaojie4039 opened a new pull request #586: connector support cloud event

wangshaojie4039 opened a new pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586


   <!--
   ### Contribution Checklist
   
     - Name the pull request in the form "[ISSUE #XXXX] Title of the pull request", 
       where *XXXX* should be replaced by the actual issue number.
       Skip *[ISSUE #XXXX]* if there is no associated github issue for this pull request.
   
     - Fill out the template below to describe the changes contributed by the pull request. 
       That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue. 
       Please do not mix up code from multiple issues.
     
     - Each commit in the pull request should have a meaningful commit message.
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, 
       leaving only the filled out template below.
   
   (The sections below can be removed for hotfixes of typos)
   -->
   
   <!--
   (If this PR fixes a GitHub issue, please add `Fixes ISSUE#<XXX>`.)
   -->
   
   Fixes ISSUE#<XXXX>.
   
   ### Motivation
   
   *Explain the content here.*
   *Explain why you want to make the changes and what problem you're trying to solve.*
   
   
   
   ### Modifications
   
   *Describe the modifications you've done.*
   
   
   
   ### Documentation
   
   - Does this pull request introduce a new feature? (yes / no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   - If a feature is not applicable for documentation, explain why?
   - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] wangshaojie4039 commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
wangshaojie4039 commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r748969678



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/MessagingAccessPointImpl.java
##########
@@ -52,7 +49,7 @@ public Properties attributes() {
 
     @Override
     public Producer createProducer(Properties properties) {
-        return new ProducerImpl(this.accessPointProperties);
+        return null;

Review comment:
       This class will be removed because OMS will be removed. This part is modified to avoid error reporting




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r749112864



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java
##########
@@ -48,7 +51,7 @@
 import io.openmessaging.api.MessageSelector;
 import io.openmessaging.api.MessagingAccessPoint;
 
-public class RocketMQConsumerImpl implements MeshMQPushConsumer {
+public class RocketMQConsumerImpl implements Consumer {

Review comment:
       If so, it's needed to change the config file in META-INF/eventmesh `org.apache.eventmesh.api.consumer.MeshMQPushConsumer` to `org.apache.eventmesh.api.consumer. Consumer ` 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r749065548



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java
##########
@@ -48,7 +51,7 @@
 import io.openmessaging.api.MessageSelector;
 import io.openmessaging.api.MessagingAccessPoint;
 
-public class RocketMQConsumerImpl implements MeshMQPushConsumer {
+public class RocketMQConsumerImpl implements Consumer {

Review comment:
       `Consumer` has replace the `MeshMQPushConsumer`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r749223064



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java
##########
@@ -48,7 +51,7 @@
 import io.openmessaging.api.MessageSelector;
 import io.openmessaging.api.MessagingAccessPoint;
 
-public class RocketMQConsumerImpl implements MeshMQPushConsumer {
+public class RocketMQConsumerImpl implements Consumer {

Review comment:
       Ok, this can be fixed later.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r749011884



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/MessagingAccessPointImpl.java
##########
@@ -52,7 +49,7 @@ public Properties attributes() {
 
     @Override
     public Producer createProducer(Properties properties) {
-        return new ProducerImpl(this.accessPointProperties);
+        return null;

Review comment:
       Does this change can keep the server start success?

##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/MessagingAccessPointImpl.java
##########
@@ -52,7 +49,7 @@ public Properties attributes() {
 
     @Override
     public Producer createProducer(Properties properties) {
-        return new ProducerImpl(this.accessPointProperties);
+        return null;

Review comment:
       Can this change keep the server start success?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r749012422



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java
##########
@@ -48,7 +51,7 @@
 import io.openmessaging.api.MessageSelector;
 import io.openmessaging.api.MessagingAccessPoint;
 
-public class RocketMQConsumerImpl implements MeshMQPushConsumer {
+public class RocketMQConsumerImpl implements Consumer {

Review comment:
       `MeshMQPushConsumer` is a service provider interface, if you remove `MeshMQPushConsumer` here, the `RocketMQConsumerImpl` can load success?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r749089702



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java
##########
@@ -48,7 +51,7 @@
 import io.openmessaging.api.MessageSelector;
 import io.openmessaging.api.MessagingAccessPoint;
 
-public class RocketMQConsumerImpl implements MeshMQPushConsumer {
+public class RocketMQConsumerImpl implements Consumer {

Review comment:
       `MeshMQPushConsumer` is replaced by `Consumer` 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 merged pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
xwm1992 merged pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r747418760



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/MessagingAccessPointImpl.java
##########
@@ -52,7 +49,7 @@ public Properties attributes() {
 
     @Override
     public Producer createProducer(Properties properties) {
-        return new ProducerImpl(this.accessPointProperties);
+        return null;

Review comment:
       Why do this change?

##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQMessageWriter.java
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rocketmq.cloudevent.impl;
+
+import org.apache.rocketmq.common.message.Message;
+
+import io.cloudevents.CloudEventData;
+import io.cloudevents.SpecVersion;
+import io.cloudevents.core.format.EventFormat;
+import io.cloudevents.core.message.MessageWriter;
+import io.cloudevents.rw.CloudEventContextWriter;
+import io.cloudevents.rw.CloudEventRWException;
+import io.cloudevents.rw.CloudEventWriter;
+
+
+public final class RocketMQMessageWriter<R>
+    implements MessageWriter<CloudEventWriter<Message>, Message>, CloudEventWriter<Message> {
+
+    private Message message;
+
+
+    public RocketMQMessageWriter(String topic) {
+        message = new Message();
+        message.setTopic(topic);
+    }
+
+    public RocketMQMessageWriter(String topic, String keys) {
+        message = new Message();
+
+        message.setTopic(topic);
+
+        if (keys != null && keys.length() > 0) {

Review comment:
       Use `StringUtils.isNotEmpty(key)`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] wangshaojie4039 commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
wangshaojie4039 commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r748969214



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/cloudevent/impl/RocketMQMessageWriter.java
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.eventmesh.connector.rocketmq.cloudevent.impl;
+
+import org.apache.rocketmq.common.message.Message;
+
+import io.cloudevents.CloudEventData;
+import io.cloudevents.SpecVersion;
+import io.cloudevents.core.format.EventFormat;
+import io.cloudevents.core.message.MessageWriter;
+import io.cloudevents.rw.CloudEventContextWriter;
+import io.cloudevents.rw.CloudEventRWException;
+import io.cloudevents.rw.CloudEventWriter;
+
+
+public final class RocketMQMessageWriter<R>
+    implements MessageWriter<CloudEventWriter<Message>, Message>, CloudEventWriter<Message> {
+
+    private Message message;
+
+
+    public RocketMQMessageWriter(String topic) {
+        message = new Message();
+        message.setTopic(topic);
+    }
+
+    public RocketMQMessageWriter(String topic, String keys) {
+        message = new Message();
+
+        message.setTopic(topic);
+
+        if (keys != null && keys.length() > 0) {

Review comment:
       ok




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 commented on a change in pull request #586: connector support cloud event

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on a change in pull request #586:
URL: https://github.com/apache/incubator-eventmesh/pull/586#discussion_r749114744



##########
File path: eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/main/java/org/apache/eventmesh/connector/rocketmq/consumer/RocketMQConsumerImpl.java
##########
@@ -48,7 +51,7 @@
 import io.openmessaging.api.MessageSelector;
 import io.openmessaging.api.MessagingAccessPoint;
 
-public class RocketMQConsumerImpl implements MeshMQPushConsumer {
+public class RocketMQConsumerImpl implements Consumer {

Review comment:
       yes, we need to test carefully before we merge to the `develop` branch 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org