forked from apache/eventmesh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from apache/master
update
- Loading branch information
Showing
34 changed files
with
1,556 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,14 @@ github: | |
squash: true | ||
merge: true | ||
rebase: false | ||
notifications: | ||
protected_branches: | ||
master: | ||
required_status_checks: | ||
strict: true | ||
required_pull_request_reviews: | ||
dismiss_stale_reviews: true | ||
required_approving_review_count: 1 | ||
notifications: | ||
commits: [email protected] | ||
# Send all issue emails (new, closed, comments) to issues@ | ||
issues: [email protected] | ||
|
@@ -51,10 +58,3 @@ github: | |
# Send individual PR comments/reviews to issues@ | ||
pullrequests_comment: [email protected] | ||
jira_options: link label worklog | ||
protected_branches: | ||
master: | ||
required_status_checks: | ||
strict: true | ||
required_pull_request_reviews: | ||
dismiss_stale_reviews: true | ||
required_approving_review_count: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,3 +72,4 @@ jobs: | |
|Users |User support and questions mailing list| [Subscribe](mailto:[email protected]) |[Unsubscribe](mailto:[email protected]) |[Mail Archives](https://lists.apache.org/[email protected])| | ||
|Development |Development related discussions| [Subscribe](mailto:[email protected]) |[Unsubscribe](mailto:[email protected]) |[Mail Archives](https://lists.apache.org/[email protected])| | ||
|Commits |All commits to repositories| [Subscribe](mailto:[email protected]) |[Unsubscribe](mailto:[email protected]) |[Mail Archives](https://lists.apache.org/[email protected])| | ||
|Issues |Issues or PRs comments and reviews| [Subscribe](mailto:[email protected]) |[Unsubscribe](mailto:[email protected]) |[Mail Archives](https://lists.apache.org/[email protected])| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ | |
|
||
# Apache EventMesh (Incubating) | ||
|
||
**Apache EventMesh (Incubating)** is a fully serverless platform used to build distributed [event-driven](https://en.wikipedia.org/wiki/Event-driven_architecture) applications. | ||
**Apache EventMesh (Incubating)** is a new generation serverless event middleware for building distributed [event-driven](https://en.wikipedia.org/wiki/Event-driven_architecture) applications. | ||
|
||
### EventMesh Architecture | ||
|
||
|
@@ -110,3 +110,4 @@ Apache EventMesh (Incubating) is licensed under the [Apache License, Version 2.0 | |
|Users|User discussion|[Subscribe](mailto:[email protected])|[Unsubscribe](mailto:[email protected])|[Mail Archives](https://lists.apache.org/[email protected])| | ||
|Development|Development discussion (Design Documents, Issues, etc.)|[Subscribe](mailto:[email protected])|[Unsubscribe](mailto:[email protected])|[Mail Archives](https://lists.apache.org/[email protected])| | ||
|Commits|Commits to related repositories| [Subscribe](mailto:[email protected]) |[Unsubscribe](mailto:[email protected]) |[Mail Archives](https://lists.apache.org/[email protected])| | ||
|Issues|Issues or PRs comments and reviews| [Subscribe](mailto:[email protected]) |[Unsubscribe](mailto:[email protected]) |[Mail Archives](https://lists.apache.org/[email protected])| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
configurations { | ||
implementation.exclude group: 'ch.qos.logback', module: 'logback-classic' | ||
implementation.exclude group: 'log4j', module: 'log4j' | ||
} | ||
|
||
dependencies { | ||
implementation project(":eventmesh-storage:eventmesh-storage-api") | ||
implementation project(":eventmesh-common") | ||
|
||
testImplementation project(":eventmesh-storage:eventmesh-storage-api") | ||
testImplementation project(":eventmesh-common") | ||
|
||
implementation 'org.mongodb:mongodb-driver:3.12.11' | ||
testImplementation 'org.mongodb:mongodb-driver:3.12.11' | ||
|
||
implementation 'io.cloudevents:cloudevents-json-jackson' | ||
testImplementation 'io.cloudevents:cloudevents-json-jackson' | ||
|
||
testImplementation "org.mockito:mockito-core" | ||
testImplementation "org.powermock:powermock-module-junit4" | ||
testImplementation "org.powermock:powermock-api-mockito2" | ||
|
||
compileOnly 'org.projectlombok:lombok:1.18.22' | ||
annotationProcessor 'org.projectlombok:lombok:1.18.22' | ||
|
||
testCompileOnly 'org.projectlombok:lombok:1.18.22' | ||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22' | ||
|
||
testImplementation 'de.bwaldvogel:mongo-java-server:1.42.0' | ||
} |
18 changes: 18 additions & 0 deletions
18
eventmesh-storage/eventmesh-storage-mongodb/gradle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 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. | ||
# | ||
|
||
pluginType=storage | ||
pluginName=mongodb |
44 changes: 44 additions & 0 deletions
44
...ngodb/src/main/java/org/apache/eventmesh/storage/mongodb/client/MongodbClientManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* 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.storage.mongodb.client; | ||
|
||
import com.mongodb.ConnectionString; | ||
import com.mongodb.client.MongoClient; | ||
import com.mongodb.client.MongoClients; | ||
|
||
public class MongodbClientManager { | ||
/** | ||
* create mongodb client | ||
* | ||
* @param url url, like: mongodb://root:[email protected]:27018,192.168.74.143:27019 | ||
* @return mongodb client | ||
*/ | ||
public static MongoClient createMongodbClient(String url) { | ||
ConnectionString connectionString = new ConnectionString(url); | ||
return MongoClients.create(connectionString); | ||
} | ||
|
||
/** | ||
* close mongodb client | ||
* | ||
* @param mongoClient mongodb client | ||
*/ | ||
public static void closeMongodbClient(MongoClient mongoClient) { | ||
mongoClient.close(); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...-storage-mongodb/src/main/java/org/apache/eventmesh/storage/mongodb/config/ConfigKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* 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.storage.mongodb.config; | ||
|
||
public class ConfigKey { | ||
|
||
public static final String STANDALONE = "STANDALONE"; | ||
|
||
public static final String REPLICA_SET = "REPLICA_SET"; | ||
} |
39 changes: 39 additions & 0 deletions
39
...ongodb/src/main/java/org/apache/eventmesh/storage/mongodb/config/ConfigurationHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* 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.storage.mongodb.config; | ||
|
||
import org.apache.eventmesh.common.config.Config; | ||
import org.apache.eventmesh.common.config.ConfigFiled; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
@Config(prefix = "eventMesh.server.mongodb", path = "classPath://mongodb-client.properties") | ||
public class ConfigurationHolder { | ||
@ConfigFiled(field = "connectorType") | ||
private String connectorType; | ||
|
||
@ConfigFiled(field = "url") | ||
private String url; | ||
|
||
@ConfigFiled(field = "database") | ||
private String database; | ||
|
||
@ConfigFiled(field = "collection") | ||
private String collection; | ||
} |
28 changes: 28 additions & 0 deletions
28
...mongodb/src/main/java/org/apache/eventmesh/storage/mongodb/constant/MongodbConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* 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.storage.mongodb.constant; | ||
|
||
public class MongodbConstants { | ||
public static final String TOPIC = "flag"; | ||
public static final String CAPPED_COL_TOPIC_FN = "topic"; | ||
public static final String CAPPED_COL_CURSOR_FN = "ts"; | ||
public static final String SEQUENCE_COLLECTION_NAME = "pub_sub_seq"; | ||
public static final String SEQUENCE_KEY_FN = "topic"; | ||
public static final String SEQUENCE_VALUE_FN = "value"; | ||
|
||
} |
Oops, something went wrong.