Skip to content

Commit

Permalink
Merge branch 'master' into master-issue3918
Browse files Browse the repository at this point in the history
  • Loading branch information
pandaapo committed May 25, 2023
2 parents 0435b67 + 0ce8d57 commit 5fba851
Show file tree
Hide file tree
Showing 407 changed files with 3,636 additions and 1,328 deletions.
16 changes: 7 additions & 9 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ github:
- event-streaming
- event-sourcing
- event-governance
- event-routing
- event-connector
- cloud-native
- serverless
- serverless-workflow
Expand All @@ -35,24 +35,22 @@ github:
- cqrs
- multi-runtime
- microservice
- state-management
- hacktoberfest
- hacktoberfest2022
enabled_merge_buttons:
squash: true
merge: true
rebase: false
squash: true
merge: true
rebase: false
protected_branches:
master:
required_status_checks:
strict: true
required_pull_request_reviews:
dismiss_stale_reviews: true
required_approving_review_count: 1
required_approving_review_count: 2
notifications:
commits: commits@eventmesh.apache.org
commits: commits@eventmesh.apache.org
# Send all issue emails (new, closed, comments) to issues@
issues: issues@eventmesh.apache.org
issues: issues@eventmesh.apache.org
# Send new/closed PR notifications to dev@
pullrequests_status: dev@eventmesh.apache.org
# Send individual PR comments/reviews to issues@
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

[![License](https://img.shields.io/github/license/apache/eventmesh?style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![GitHub Release](https://img.shields.io/github/v/release/apache/eventmesh?style=for-the-badge)](https://github.com/apache/eventmesh/releases)
[![Slack Status](https://img.shields.io/badge/slack-join_chat-blue.svg?logo=slack&style=for-the-badge)](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-1t1816dli-I0t3OE~IpdYWrZbIWhMbXg)
[![Slack Status](https://img.shields.io/badge/slack-join_chat-blue.svg?logo=slack&style=for-the-badge)](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-1vpgrvm5u-hh~5H9Aj4TGThaP9tusFfw)


[📦 Documentation](https://eventmesh.apache.org/docs/introduction) |
[📔 Examples](https://github.com/apache/eventmesh/tree/master/eventmesh-examples) |
Expand All @@ -26,7 +27,7 @@

### EventMesh Architecture

![EventMesh Architecture](resources/eventmesh-architecture-3.png)
![EventMesh Architecture](resources/eventmesh-architecture-4.png)

### EventMesh Dashboard
![EventMesh Dashboard](resources/dashboard.png)
Expand All @@ -36,7 +37,7 @@
Apache EventMesh has a vast amount of features to help users achieve their goals. Let us share with you some of the key features EventMesh has to offer:

- Built around the [CloudEvents](https://cloudevents.io) specification.
- Rapidty extendsible interconnector layer such as the source or sink of Saas, CloudService, and Database etc.
- Rapidty extendsible interconnector layer [connectors](https://github.com/apache/eventmesh/tree/master/eventmesh-connectors) such as the source or sink of Saas, CloudService, and Database etc.
- Rapidty extendsible storage layer such as [Apache RocketMQ](https://rocketmq.apache.org), [Apache Kafka](https://kafka.apache.org), [Apache Pulsar](https://pulsar.apache.org), [RabbitMQ](https://rabbitmq.com), [Redis](https://redis.io), [Pravega](https://cncf.pravega.io), and [RDMS](https://en.wikipedia.org/wiki/Relational_database)(in progress) using [JDBC](https://en.wikipedia.org/wiki/Java_Database_Connectivity).
- Rapidty extendsible controller such as [Consul](https://consulproject.org/en/), [Nacos](https://nacos.io), [ETCD](https://etcd.io) and [Zookeeper](https://zookeeper.apache.org/).
- Guaranteed at-least-once delivery.
Expand All @@ -50,7 +51,7 @@ Apache EventMesh has a vast amount of features to help users achieve their goals
## Roadmap
Please go to the [roadmap](https://eventmesh.apache.org/docs/roadmap) to get the release history and new features of Apache EventMesh.

## Community
## Subprojects
- [EventMesh-site](https://github.com/apache/eventmesh-site): Apache official website resources for EventMesh.
- [EventMesh-workflow](https://github.com/apache/eventmesh-workflow): Serverless workflow runtime for event Orchestration on EventMesh.
- [EventMesh-dashboard](https://github.com/apache/eventmesh-dashboard): Operation and maintenance console of EventMesh.
Expand Down Expand Up @@ -107,7 +108,7 @@ Apache EventMesh is licensed under the [Apache License, Version 2.0](http://www.

|WeChat Assistant|WeChat Public Account|Slack|
|-|-|-|
|<img src="resources/wechat-assistant.jpg" width="128"/>|<img src="resources/wechat-official.jpg" width="128"/>|[Join Slack Chat](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-1t1816dli-I0t3OE~IpdYWrZbIWhMbXg)|
|<img src="resources/wechat-assistant.jpg" width="128"/>|<img src="resources/wechat-official.jpg" width="128"/>|[Join Slack Chat](https://join.slack.com/t/apacheeventmesh/shared_invite/zt-1vpgrvm5u-hh~5H9Aj4TGThaP9tusFfw)|

Bi-weekly meeting : [#Tencent meeting](https://meeting.tencent.com/dm/wes6Erb9ioVV) : 346-6926-0133

Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

### EventMesh 架构

![EventMesh Architecture](resources/eventmesh-architecture-3.png)
![EventMesh Architecture](resources/eventmesh-architecture-4.png)

### EventMesh Dashboard

Expand All @@ -38,7 +38,7 @@
Apache EventMesh提供了许多功能来帮助用户实现他们的目标,以下是一些EventMesh的关键特点:

- 基于 [CloudEvents](https://cloudevents.io) 规范构建。
- 快速可扩展的Connector,例如作为Saas、CloudService和数据库等的source 或sink。.
- 快速可扩展的Connector,[connectors](https://github.com/apache/eventmesh/tree/master/eventmesh-connectors)例如作为Saas、CloudService和数据库等的source 或sink。.
- 快速可扩展的存储层,使用 [JDBC](https://en.wikipedia.org/wiki/Java_Database_Connectivity)[Apache RocketMQ](https://rocketmq.apache.org), [Apache Kafka](https://kafka.apache.org), [Apache Pulsar](https://pulsar.apache.org), [RabbitMQ](https://rabbitmq.com), [Redis](https://redis.io), [Pravega](https://cncf.pravega.io), 和 [RDMS](https://en.wikipedia.org/wiki/Relational_database)(正在进行中)集成。
- 快速可扩展的控制器,例如 [Consul](https://consulproject.org/en/), [Nacos](https://nacos.io), [ETCD](https://etcd.io)[Zookeeper](https://zookeeper.apache.org/)
- 至少一次的可靠性投递。
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ allprojects {
showViolations = true
maxWarnings = 0
configFile = new File("${rootDir}/style/checkStyle.xml")
configDirectory = file("${rootDir}/style")
}

checkstyleMain.exclude '**/org/apache/eventmesh/client/grpc/protos**'
Expand Down Expand Up @@ -449,6 +450,7 @@ subprojects {
dependency "com.fasterxml.jackson.core:jackson-databind:2.13.0"
dependency "com.fasterxml.jackson.core:jackson-core:2.13.0"
dependency "com.fasterxml.jackson.core:jackson-annotations:2.13.0"
dependency "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.0"

dependency "org.asynchttpclient:async-http-client:2.12.0"
dependency "org.apache.httpcomponents:httpclient:4.5.13"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* 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.response;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.fasterxml.jackson.databind.ObjectMapper;

public class TopicResponseTest {

@Test
public void testTopicResponse() {
String topic = "testtopic";
String createdTime = "2023-05-17 10:30:00";
TopicResponse topicResponse = new TopicResponse(topic, createdTime);

assertEquals(topic, topicResponse.getTopic());
assertEquals(createdTime, topicResponse.getCreatedTime());
}

@Test
public void testTopicResponseSerialization() throws Exception {
String topic = "testtopic";
String createdTime = "2023-05-17 10:30:00";
TopicResponse topicResponse = new TopicResponse(topic, createdTime);

ObjectMapper objectMapper = new ObjectMapper();
String json = objectMapper.writeValueAsString(topicResponse);

assertTrue(json.contains("topic"));
assertTrue(json.contains("created_time"));

TopicResponse deserializedResponse = objectMapper.readValue(json, TopicResponse.class);

assertEquals(topic, deserializedResponse.getTopic());
assertEquals(createdTime, deserializedResponse.getCreatedTime());
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +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
* 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.
* 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.common.loadbalance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public class HttpCommand implements ProtocolTransportObject {

public String httpVersion;

public Header header;
private transient Header header;

public Body body;
private transient Body body;

//Command request time
public long reqTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.apache.eventmesh.common.enums.HttpMethod;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
Expand Down Expand Up @@ -70,4 +71,12 @@ public void testParsePostBody() throws Exception {
Assert.assertEquals(expected, actual);

}

@Test
public void testSendSuccessResponseHeaders() throws IOException {
HttpExchange exchange = Mockito.mock(HttpExchange.class);
NetUtils.sendSuccessResponseHeaders(exchange);
Mockito.verify(exchange, Mockito.times(1))
.sendResponseHeaders(Mockito.anyInt(), Mockito.anyLong());
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +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
* 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
* 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.
* 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.common.utils;
Expand Down
39 changes: 32 additions & 7 deletions eventmesh-connectors/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
Connector - A connector is a bridge that interacts with a specific external service or underlying data source (e.g., Databases) on behalf of user applications. A connector is either a Source or a Sink.
# Connectors

Source - A source connector obtains data from an underlying data producer and delivers it to targets, after original data has been transformed into CloudEvents. It doesn't limit the way how a source retrieves data. (e.g., A source may pull data from a message queue or act as an HTTP server waiting for data sent to it).
## Connector
A connector is a bridge that interacts with a specific external service or underlying data source (e.g., Databases) on behalf of user applications. A connector is either a Source or a Sink.

Sink - A sink connector receives CloudEvents and does some specific business logics. (e.g., A MySQL Sink extracts useful data from CloudEvents and writes them to a MySQL database).
## Source
A source connector obtains data from an underlying data producer and delivers it to targets, after original data has been transformed into CloudEvents. It doesn't limit the way how a source retrieves data. (e.g., A source may pull data from a message queue or act as an HTTP server waiting for data sent to it).

## Sink
A sink connector receives CloudEvents and does some specific business logics. (e.g., A MySQL Sink extracts useful data from CloudEvents and writes them to a MySQL database).
CloudEvents - A specification for describing event data in common formats to provide interoperability across services, platforms and systems.

Add a new connector by implementting the source/sink interface using different SDKs:
## Implements
Add a new connector by implementing the source/sink interface using :

[eventmesh-sdk-java](https://github.com/apache/eventmesh/tree/master/eventmesh-sdk-java)
[eventmesh-openconnect-java](https://github.com/apache/eventmesh/tree/master/eventmesh-openconnect/eventmesh-openconnect-java)

[eventmesh-sdk-go](https://github.com/apache/eventmesh/tree/master/eventmesh-sdk-go)
## Connector Status

[eventmesh-sdk-rust](https://github.com/apache/eventmesh/tree/master/eventmesh-sdk-rust)
| Connector Name | Type | Support Version |
|---------------------------------------|--------|-----------------|
| [RocketMQ](sink-connector-rocketmq) | Sink | N/A |
| [RocketMQ](source-connector-rocketmq) | Source | N/A |
| ClickHouse | Sink | N/A |
| ClickHouse | Source | N/A |
| DingTalk | Sink | N/A |
| Email | Sink | N/A |
| FeiShu | Sink | N/A |
| Github | Source | N/A |
| Http | Sink | N/A |
| Http | Source | N/A |
| Jdbc | Sink | N/A |
| Jdbc | Source | N/A |
| MySqlCDC | Source | N/A |
| MongoDB | Sink | N/A |
| MongoDB | Source | N/A |
| S3File | Sink | N/A |
| S3File | Source | N/A |
| More connectors will be added... | Source/Sink | N/A |
16 changes: 16 additions & 0 deletions eventmesh-connectors/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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.
*/
16 changes: 16 additions & 0 deletions eventmesh-connectors/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# 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.
#
Loading

0 comments on commit 5fba851

Please sign in to comment.