Skip to content

Commit

Permalink
fix conflicts and update the code (#635)
Browse files Browse the repository at this point in the history
* Add files via upload

* Update README.md

* [ISSUE #580] Add checkstyle gradle plugin (#581)

* Add checkstyle gradle plugin, change plugin package

* skip check in ci

* update wechat-official qr code

* update mesh-helper qr code

* Add files via upload

* update README.md

* update README.md

* Update .asf.yaml

* [ISSUE #588] Fix typo in README.md (#589)

close #588

* [Bug #590] Consumer subscription topic is invalid (#590) (#592)

* [Bug #590] Consumer subscription topic is invalid (#590)

* [Bug #590] Consumer subscription topic is invalid (#590)

close #590

* fixed a wrong url in cn-doc (#585)

close #596

* resolve_exception->Consumer subscription topic is invalid #590 (#598)

close #590

* Update eventmesh-store-quickstart.md

* Update README.md

* Add slack icon (#601)

* eventmesh-admin-rocketmq submodule and createTopic REST API (#530)

* eventmesh-admin-rocketmq submodule and createTopic draft API

* add license header

* change to /topicmanage

* fix build error

* fix some code check style issues

close #435 #346

* create topic command (#531)

* create topic command

* address review comments

* fix build and add createtopic method to standalone module

* fix build issue

* fix a few remaining code check issues

* fix test

close #346

* Update README.md

* Safely delete useless log4j dependencies

* Safely delete outdated metrics dependencies

* Sately delete useless collections4 dependency

* Safely delete useless commons dependencies

* Reback to the collections4, but let it not in api dependency

* Could not remove text for Safe Ramdom implementation

* Fix build error

* Add collection4

* Fix build error

* Revert "Safely delete outdated metrics dependencies"

This reverts commit 92287b0.

* Change to api dependency

* Remove doclint warnings

* Depracated checkstyle check error temporarily, we should remove it when we polish later

* Update .asf.yaml

* Update .asf.yaml

Co-authored-by: Eason Chen <qqeasonchen@gmail.com>
Co-authored-by: Wenjun Ruan <wenjun@apache.org>
Co-authored-by: Nicholas Zhan <zhan_nicholas@outlook.com>
Co-authored-by: hagsyn <44764414+hagsyn@users.noreply.github.com>
Co-authored-by: sarihuangshanrong <280456134@qq.com>
Co-authored-by: yuri <yu.zhao5@huawei.com>
Co-authored-by: vongosling <vongosling@apache.org>
  • Loading branch information
8 people authored Dec 8, 2021
1 parent 46471ed commit 8ea15f6
Show file tree
Hide file tree
Showing 32 changed files with 1,024 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ github:
- microservice
- state-management
enabled_merge_buttons:
merge: true
squash: true
merge: false
rebase: false
protected_branches:
master:
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-eventmesh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-eventmesh/alerts/)
[![GitHub release](https://img.shields.io/badge/release-download-orange.svg)](https://github.com/apache/incubator-eventmesh/releases)
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-yx3n2ak7-HcVG98CDqb~7PwgoDzgfMA)

[点我查看中文版](README.zh-CN.md)

Expand Down Expand Up @@ -47,7 +48,7 @@ Event & Service
- [ ] Event transaction
- [ ] At-least-once/at-most-once delivery guarantees

Connector
Store Connector
- [x] RocketMQ
- [x] InMemory
- [ ] Federated
Expand All @@ -64,6 +65,8 @@ Protocol
- [ ] gRPC
- [ ] CloudEvents
- [ ] MQTT
- [ ] WebSocket
- [ ] AMQP
- [ ] AsyncAPI

SDK
Expand All @@ -90,7 +93,7 @@ Governance
- [x] Client management
- [ ] Topic management
- [ ] Metadata registry
- [x] Schema registry
- [ ] Schema registry
- [ ] Dynamic config

Choreography
Expand All @@ -105,7 +108,7 @@ Runtime
- [ ] WebAssembly runtime

## Quick Start
1. [Connector quickstart](https://rocketmq.apache.org/docs/quick-start/) (RocketMQ, ignore this step if use standalone).
1. [Store quickstart](docs/en/instructions/eventmesh-store-quickstart.md)
2. [Runtime quickstart](docs/en/instructions/eventmesh-runtime-quickstart.md) or [Runtime quickstart with docker](docs/en/instructions/eventmesh-runtime-quickstart-with-docker.md).
3. [Java SDK examples](docs/en/instructions/eventmesh-sdk-java-quickstart.md).

Expand All @@ -127,13 +130,9 @@ EventMesh enriches the <a href="https://landscape.cncf.io/serverless?license=apa
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) Copyright (C) Apache Software Foundation.

## Community
| WeChat group | WeChat public account |
| :---------------------------------------: | :----------------------------------------------------: |
| ![wechat_qr](docs/images/mesh-helper.jpg) | ![wechat_official_qr](docs/images/wechat-official.png) |




| WeChat Assistant | WeChat public account | Slack |
| :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: |
| ![wechat_qr](docs/images/mesh-helper.jpg) | ![wechat_official_qr](docs/images/wechat-official.png) |[Join slack chat](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-yx3n2ak7-HcVG98CDqb~7PwgoDzgfMA) |

Mailing Lists:

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ EventMesh是一个动态的云原生事件驱动架构基础设施,用于分

**通信协议:**

eventmesh的通信协议更加简洁方便,详细内容,阅读更多[这里](docs/cn/instructions/eventmesh-runtime-protocol.zh-CN.md)
eventmesh的通信协议更加简洁方便,详细内容,阅读更多[这里](docs/cn/instructions/eventmesh-runtime-protocol.md)

## RoadMap
| version | feature |
Expand Down
17 changes: 12 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ buildscript {
}
}

//Remove doclint warnings that pollute javadoc logs when building with java8
if(JavaVersion.current().isJava8Compatible()){
allprojects {
tasks.withType(Javadoc){
options.addStringOption('xdoclint:none','-quiet')
}
}
}

allprojects {
apply plugin: 'java'
apply plugin: "eclipse"
Expand All @@ -60,7 +69,7 @@ allprojects {
delete 'out'
}

if ((project.findProperty("snapshot") instanceof String) && (Boolean.valueOf(project.property("snapshot")))) {
if ((project.findProperty("snapshot") instanceof String) && (Boolean.valueOf(project.property("snapshot") as boolean))) {
version = version + "-SNAPSHOT"
}

Expand Down Expand Up @@ -400,17 +409,15 @@ subprojects {
dependencies {
dependency "org.apache.commons:commons-lang3:3.6"
dependency "org.apache.commons:commons-collections4:4.1"
dependency "commons-io:commons-io:2.4"
dependency "org.apache.commons:commons-text:1.9"

dependency "com.google.guava:guava:29.0-jre"

dependency "com.google.guava:guava:29.0-jre"

dependency "org.slf4j:slf4j-api:1.7.30"
dependency "org.apache.logging.log4j:log4j-api:2.13.3"
dependency "org.apache.logging.log4j:log4j-core:2.13.3"
dependency "org.apache.logging.log4j:log4j-core:2.13.3"
dependency "org.apache.logging.log4j:log4j-slf4j-impl:2.13.3"
dependency "org.apache.logging.log4j:log4j-web:2.13.3"

dependency "com.lmax:disruptor:3.4.2"

Expand Down
52 changes: 11 additions & 41 deletions docs/en/instructions/eventmesh-store-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,19 @@
Gradle at least 5.6, eg 5.6.*
4g+ free disk for eventmesh-store server
```
### Standalone-connector
No need a third-party store.

### download sources
### RocketMQ-connector
you can reference https://rocketmq.apache.org/docs/quick-start/

download source code from [https://github.com/WeBankFinTech/DeFiBus](https://github.com/WeBankFinTech/DeFiBus)
You will get **DefiBus-master.zip**
and "One-click" build script is on going.

### build sources
### Kafka-connector
WIP

The eventmesh-store takes DeFiBus for example at the following parts, because eventmesh depends on defibus as store layer
by default, other implements such as Rocketmq etc. is coming soon.

```
unzip DefiBus-master.zip
cd /*YOUR DEPLOY PATH*/DefiBus-master
gradle clean dist tar -x test
```

You will get **DeFiBus_1.0.0.tar.gz** in directory /* YOUR DEPLOY PATH */DefiBus-master/build

### Deployment

- deploy DeFiBusNamesrv

```
upload DeFiBus_1.0.0.tar.gz
tar -zxvf DeFiBus_1.0.0.tar.gz
cd bin
sh runnamesrv.sh
```

If you see "Thre Name Server boot success" in ../logs/namesrv.log, you setup DeFiBus Namesrv successfully.

- deploy DeFiBusBroker

```
upload DeFiBus_1.0.0.tar.gz
tar -zxvf DeFiBus_1.0.0.tar.gz
cd conf
config your broker.properties
cd ../bin
sh runbroker.sh
```

If you see "The broker \[YOUR-BROKER-NAME, IP:PORT\] boot success." in ../logs/broker.log, you setup eventmesh-store
successfully.
### Redis-connector
WIP

### DeFiBus-connector
WIP
12 changes: 6 additions & 6 deletions eventmesh-admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ EventMesh Administration Module for EventMesh. It manages Admin Service, Configu

## Administration Client Manager APIs

### POST /clientmanage/topics/
### POST /topicmanage
- Create a new topic if does not exist
- Exposed POST endpoint to create a new topic if it does not exist.
* Url - http://localhost:8081/clientmanage/topics/
* Url - http://localhost:8081/topicmanage
* sample request payload
```json
{
Expand All @@ -23,12 +23,12 @@ EventMesh Administration Module for EventMesh. It manages Admin Service, Configu
"created_time": "2021-09-03",
}
```
### DELETE /clientmanage/topics/(string: topic)/
### DELETE /topicmanage/(string: topic)
- Delete a specific topic.
- Exposed DELETE endpoint to remove a specific topic
* URL -
```url
http://localhost:8081/clientmanage/topics/mytopic1
http://localhost:8081/topicmanage/mytopic1
```

* Response -
Expand All @@ -39,12 +39,12 @@ EventMesh Administration Module for EventMesh. It manages Admin Service, Configu
}
```

### GET /clientmanage/topics
### GET /topicmanage
- Retrieve a list of topics
- Exposed GET endpoint to retrieve all topics
* URL -
```url
http://localhost:8081/clientmanage/topics
http://localhost:8081/topicmanage
```
* Response

Expand Down
19 changes: 18 additions & 1 deletion eventmesh-admin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,22 @@
* limitations under the License.
*/

dependencies {
task copyEventMeshAdmin(dependsOn: ['jar']) {
doFirst {
new File(projectDir, '../eventmesh-admin/dist/apps').mkdir()
new File(projectDir, '../dist/admin/').mkdirs()
}
doLast {
copy {
into('../eventmesh-admin/dist/apps/')
from project.jar.getArchivePath()
exclude {
"eventmesh-admin-${version}.jar"
}
}
copy {
into '../dist/admin'
from "../eventmesh-admin/dist/apps/eventmesh-admin-rocketmq-${version}.jar"
}
}
}
30 changes: 30 additions & 0 deletions eventmesh-admin/eventmesh-admin-rocketmq/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* 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.
*/


dependencies {
compileOnly project(":eventmesh-common")

implementation "org.apache.httpcomponents:httpclient"
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.core:jackson-core"
implementation "com.fasterxml.jackson.core:jackson-annotations"

implementation project(":eventmesh-connector-plugin:eventmesh-connector-api")

testImplementation project(":eventmesh-connector-plugin:eventmesh-connector-api")
}
17 changes: 17 additions & 0 deletions eventmesh-admin/eventmesh-admin-rocketmq/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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.
#

rocketmq_version=4.7.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* 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.admin.rocketmq.controller;

import org.apache.eventmesh.admin.rocketmq.handler.TopicsHandler;

import java.io.IOException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sun.net.httpserver.HttpServer;

public class AdminController {

private static final Logger logger = LoggerFactory.getLogger(AdminController.class);

public AdminController() {
}

public void run(HttpServer server) throws IOException {

server.createContext("/topicmanage", new TopicsHandler());

logger.info("EventMesh-Admin Controller server context created successfully");
}
}
Loading

0 comments on commit 8ea15f6

Please sign in to comment.