You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "mroccyen (via GitHub)" <gi...@apache.org> on 2023/03/02 15:18:04 UTC

[GitHub] [incubator-eventmesh] mroccyen opened a new pull request, #3328: [ISSUE #2495] Add mongodb connector producer

mroccyen opened a new pull request, #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328

   <!--
   ### 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 #<XXX>` or `Closes #<XXX>`.)
   -->
   
   Fixes #2495.
   
   ### 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] mxsm commented on a diff in pull request #3328: [ISSUE #2495] Add mongodb connector producer

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on code in PR #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328#discussion_r1124054526


##########
eventmesh-connector-plugin/eventmesh-connector-mongodb/src/main/java/org/apache/eventmesh/connector/mongodb/producer/MongodbReplicaSetProducer.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.mongodb.producer;
+
+import org.apache.eventmesh.api.RequestReplyCallback;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.connector.mongodb.client.MongodbClientManager;
+import org.apache.eventmesh.connector.mongodb.config.ConfigurationHolder;
+import org.apache.eventmesh.connector.mongodb.utils.MongodbCloudEventUtil;
+
+import java.util.Properties;
+
+import org.bson.Document;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.cloudevents.CloudEvent;
+
+import com.mongodb.client.MongoClient;
+import com.mongodb.client.MongoCollection;
+
+public class MongodbReplicaSetProducer implements Producer {
+    private static final Logger logger = LoggerFactory.getLogger(MongodbReplicaSetProducer.class);

Review Comment:
   > @xwm1992 is there such a requirement for use? I'll modify it if there is.
   
   Master branch that I have done this.



-- 
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 #3328: [ISSUE #2495] Add mongodb connector producer

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 merged PR #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328


-- 
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] codecov[bot] commented on pull request #3328: [ISSUE #2495] Add mongodb connector producer

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328#issuecomment-1452112203

   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3328](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b41dabe) into [mongodb-connector](https://codecov.io/gh/apache/incubator-eventmesh/commit/e85ad116b9cb751bbec12f101553de66841fb5e5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e85ad11) will **increase** coverage by `0.41%`.
   > The diff coverage is `31.20%`.
   
   > :exclamation: Current head b41dabe differs from pull request most recent head 2a04c24. Consider uploading reports for the commit 2a04c24 to get more accurate results
   
   ```diff
   @@                   Coverage Diff                   @@
   ##             mongodb-connector    #3328      +/-   ##
   =======================================================
   + Coverage                11.54%   11.95%   +0.41%     
   - Complexity                 904      940      +36     
   =======================================================
     Files                      476      491      +15     
     Lines                    27992    28322     +330     
     Branches                  3033     3048      +15     
   =======================================================
   + Hits                      3231     3386     +155     
   - Misses                   24472    24632     +160     
   - Partials                   289      304      +15     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...or/mongodb/producer/MongodbReplicaSetProducer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1tb25nb2RiL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL21vbmdvZGIvcHJvZHVjZXIvTW9uZ29kYlJlcGxpY2FTZXRQcm9kdWNlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...sh/connector/mongodb/producer/MongodbProducer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1tb25nb2RiL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL21vbmdvZGIvcHJvZHVjZXIvTW9uZ29kYlByb2R1Y2VyLmphdmE=) | `48.14% <48.14%> (ø)` | |
   | [...or/mongodb/producer/MongodbStandaloneProducer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1tb25nb2RiL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL21vbmdvZGIvcHJvZHVjZXIvTW9uZ29kYlN0YW5kYWxvbmVQcm9kdWNlci5qYXZh) | `50.98% <50.98%> (ø)` | |
   | [...tandalone/broker/task/HistoryMessageClearTask.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1zdGFuZGFsb25lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL3N0YW5kYWxvbmUvYnJva2VyL3Rhc2svSGlzdG9yeU1lc3NhZ2VDbGVhclRhc2suamF2YQ==) | `29.41% <0.00%> (-17.65%)` | :arrow_down: |
   | [...mesh/connector/standalone/broker/MessageQueue.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1zdGFuZGFsb25lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY29ubmVjdG9yL3N0YW5kYWxvbmUvYnJva2VyL01lc3NhZ2VRdWV1ZS5qYXZh) | `32.46% <0.00%> (-7.80%)` | :arrow_down: |
   | [.../admin/handler/QueryRecommendEventMeshHandler.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvUXVlcnlSZWNvbW1lbmRFdmVudE1lc2hIYW5kbGVyLmphdmE=) | `33.33% <0.00%> (-3.71%)` | :arrow_down: |
   | [.../trace/pinpoint/exporter/PinpointSpanExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXRyYWNlLXBsdWdpbi9ldmVudG1lc2gtdHJhY2UtcGlucG9pbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC90cmFjZS9waW5wb2ludC9leHBvcnRlci9QaW5wb2ludFNwYW5FeHBvcnRlci5qYXZh) | `68.24% <0.00%> (-0.68%)` | :arrow_down: |
   | [...che/eventmesh/runtime/boot/AbstractHTTPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvQWJzdHJhY3RIVFRQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...che/eventmesh/runtime/boot/EventMeshTCPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvRXZlbnRNZXNoVENQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...sh/client/http/producer/EventMeshHttpProducer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L2h0dHAvcHJvZHVjZXIvRXZlbnRNZXNoSHR0cFByb2R1Y2VyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | ... and [17 more](https://codecov.io/gh/apache/incubator-eventmesh/pull/3328?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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] mroccyen commented on a diff in pull request #3328: [ISSUE #2495] Add mongodb connector producer

Posted by "mroccyen (via GitHub)" <gi...@apache.org>.
mroccyen commented on code in PR #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328#discussion_r1124070475


##########
eventmesh-connector-plugin/eventmesh-connector-mongodb/src/main/java/org/apache/eventmesh/connector/mongodb/producer/MongodbReplicaSetProducer.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.mongodb.producer;
+
+import org.apache.eventmesh.api.RequestReplyCallback;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.connector.mongodb.client.MongodbClientManager;
+import org.apache.eventmesh.connector.mongodb.config.ConfigurationHolder;
+import org.apache.eventmesh.connector.mongodb.utils.MongodbCloudEventUtil;
+
+import java.util.Properties;
+
+import org.bson.Document;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.cloudevents.CloudEvent;
+
+import com.mongodb.client.MongoClient;
+import com.mongodb.client.MongoCollection;
+
+public class MongodbReplicaSetProducer implements Producer {
+    private static final Logger logger = LoggerFactory.getLogger(MongodbReplicaSetProducer.class);

Review Comment:
   > > @xwm1992 is there such a requirement for use? I'll modify it if there is.
   > 
   > Master branch that I have done this.
   
   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] mxsm commented on pull request #3328: [ISSUE #2495] Add mongodb connector producer

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on PR #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328#issuecomment-1459159840

   Hi @mroccyen Currently, the project is separating the Connector and Storage components. You can wait to see the module format of Storage and then modify this portion to become part of the Storage module. This may require modifying the module and package names.  @xwm1992 


-- 
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] mxsm commented on a diff in pull request #3328: [ISSUE #2495] Add mongodb connector producer

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on code in PR #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328#discussion_r1123311552


##########
eventmesh-connector-plugin/eventmesh-connector-mongodb/src/main/java/org/apache/eventmesh/connector/mongodb/producer/MongodbReplicaSetProducer.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.mongodb.producer;
+
+import org.apache.eventmesh.api.RequestReplyCallback;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.connector.mongodb.client.MongodbClientManager;
+import org.apache.eventmesh.connector.mongodb.config.ConfigurationHolder;
+import org.apache.eventmesh.connector.mongodb.utils.MongodbCloudEventUtil;
+
+import java.util.Properties;
+
+import org.bson.Document;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.cloudevents.CloudEvent;
+
+import com.mongodb.client.MongoClient;
+import com.mongodb.client.MongoCollection;
+
+public class MongodbReplicaSetProducer implements Producer {
+    private static final Logger logger = LoggerFactory.getLogger(MongodbReplicaSetProducer.class);

Review Comment:
   How about use lombok annotation @Slf4j



##########
eventmesh-connector-plugin/eventmesh-connector-mongodb/src/main/java/org/apache/eventmesh/connector/mongodb/producer/MongodbStandaloneProducer.java:
##########
@@ -0,0 +1,158 @@
+/*
+ * 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.mongodb.producer;
+
+import org.apache.eventmesh.api.RequestReplyCallback;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.connector.mongodb.client.MongodbClientManager;
+import org.apache.eventmesh.connector.mongodb.config.ConfigurationHolder;
+import org.apache.eventmesh.connector.mongodb.constant.MongodbConstants;
+import org.apache.eventmesh.connector.mongodb.utils.MongodbCloudEventUtil;
+import org.apache.eventmesh.connector.mongodb.utils.MongodbSequenceUtil;
+
+import java.util.Properties;
+
+import org.bson.Document;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.cloudevents.CloudEvent;
+
+import com.mongodb.client.MongoClient;
+import com.mongodb.client.MongoCollection;
+import com.mongodb.client.MongoDatabase;
+
+@SuppressWarnings("all")
+public class MongodbStandaloneProducer implements Producer {
+
+    private static final Logger logger = LoggerFactory.getLogger(MongodbStandaloneProducer.class);

Review Comment:
   How about use lombok annotation @slf4j



##########
eventmesh-connector-plugin/eventmesh-connector-mongodb/src/main/java/org/apache/eventmesh/connector/mongodb/producer/MongodbReplicaSetProducer.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.mongodb.producer;
+
+import org.apache.eventmesh.api.RequestReplyCallback;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.connector.mongodb.client.MongodbClientManager;
+import org.apache.eventmesh.connector.mongodb.config.ConfigurationHolder;
+import org.apache.eventmesh.connector.mongodb.utils.MongodbCloudEventUtil;
+

Review Comment:
   MongodbCloudEventUtil class not find



-- 
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] mroccyen commented on a diff in pull request #3328: [ISSUE #2495] Add mongodb connector producer

Posted by "mroccyen (via GitHub)" <gi...@apache.org>.
mroccyen commented on code in PR #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328#discussion_r1123978683


##########
eventmesh-connector-plugin/eventmesh-connector-mongodb/src/main/java/org/apache/eventmesh/connector/mongodb/producer/MongodbReplicaSetProducer.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.mongodb.producer;
+
+import org.apache.eventmesh.api.RequestReplyCallback;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.connector.mongodb.client.MongodbClientManager;
+import org.apache.eventmesh.connector.mongodb.config.ConfigurationHolder;
+import org.apache.eventmesh.connector.mongodb.utils.MongodbCloudEventUtil;
+
+import java.util.Properties;
+
+import org.bson.Document;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.cloudevents.CloudEvent;
+
+import com.mongodb.client.MongoClient;
+import com.mongodb.client.MongoCollection;
+
+public class MongodbReplicaSetProducer implements Producer {
+    private static final Logger logger = LoggerFactory.getLogger(MongodbReplicaSetProducer.class);

Review Comment:
   @xwm1992 is there such a requirement for use?  I'll modify it if there is.



-- 
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] mxsm commented on a diff in pull request #3328: [ISSUE #2495] Add mongodb connector producer

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on code in PR #3328:
URL: https://github.com/apache/incubator-eventmesh/pull/3328#discussion_r1123314749


##########
eventmesh-connector-plugin/eventmesh-connector-mongodb/src/main/java/org/apache/eventmesh/connector/mongodb/producer/MongodbReplicaSetProducer.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.mongodb.producer;
+
+import org.apache.eventmesh.api.RequestReplyCallback;
+import org.apache.eventmesh.api.SendCallback;
+import org.apache.eventmesh.api.SendResult;
+import org.apache.eventmesh.api.exception.ConnectorRuntimeException;
+import org.apache.eventmesh.api.exception.OnExceptionContext;
+import org.apache.eventmesh.api.producer.Producer;
+import org.apache.eventmesh.connector.mongodb.client.MongodbClientManager;
+import org.apache.eventmesh.connector.mongodb.config.ConfigurationHolder;
+import org.apache.eventmesh.connector.mongodb.utils.MongodbCloudEventUtil;
+

Review Comment:
   MongodbCloudEventUtil class not find



-- 
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