File tree Expand file tree Collapse file tree 7 files changed +35
-13
lines changed
eventmesh-connector-mongodb
eventmesh-connector-rabbitmq
eventmesh-connector-redis
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/push Expand file tree Collapse file tree 7 files changed +35
-13
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one or more
3
+ # contributor license agreements. See the NOTICE file distributed with
4
+ # this work for additional information regarding copyright ownership.
5
+ # The ASF licenses this file to You under the Apache License, Version 2.0
6
+ # (the "License"); you may not use this file except in compliance with
7
+ # the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+ * .sh text eol =lf
18
+ gradlew text eol =lf
19
+ * .{cmd, [cC ][mM ][dD ]} text eol =crlf
20
+ * .{bat, [bB ][aA ][tT ]} text eol =crlf
Original file line number Diff line number Diff line change 3
3
## Connector
4
4
5
5
A connector is an image or instance 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.
6
+
6
7
Connector runs as a standalone service by ` main() ` .
7
8
8
9
## Source
Original file line number Diff line number Diff line change 2
2
3
3
## 连接器类型
4
4
5
- 连接器是代表用户应用程序与特定外部服务或底层数据源(例如数据库)交互的镜像或实例。连接器的类型可以是源(Source)或汇(Sink)。连接器通过 ` main() ` 作为一个独立服务运行
5
+ 连接器是代表用户应用程序与特定外部服务或底层数据源(例如数据库)交互的镜像或实例。连接器的类型可以是源(Source)或汇(Sink)。
6
+
7
+ 连接器通过 ` main() ` 作为一个独立服务运行。
6
8
7
9
## 数据源(Source 端)
8
10
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ connectorConfig:
30
30
31
31
## MongoDBSourceConnector:从 MongoDB 到 EventMesh
32
32
33
- 1. 启动你的 MongoDB 服务和 EventMesh Runtime。
34
- 2. 启用 sourceConnector 并检查 ` source-config.yml`(与 sink-config.yml 基本相同)。
35
- 3. 启动你的 MongoDBSourceConnector,它将订阅到 mongodb 中的 `connectorConfig.collection`,并将数据发送到 EventMesh Runtime 中的 `pubSubConfig.subject`。
33
+ 1. 启动你的 MongoDB 服务和 EventMesh Runtime。
34
+ 2. 启用 sourceConnector 并检查 ` source-config.yml`(与 sink-config.yml 基本相同)。
35
+ 3. 启动你的 MongoDBSourceConnector,它将订阅到 MongoDB 中的 `connectorConfig.collection`,并将数据发送到 EventMesh Runtime 中的 `pubSubConfig.subject`。
36
36
4. 向 MongoDB 中 `yourDB` 的 `yourCol` 写入一个 CloudEvent 消息,然后你将在 EventMesh 中接收到该消息。
Original file line number Diff line number Diff line change 2
2
3
3
## RabbitMQSinkConnector:从 EventMesh 到 RabbitMQ
4
4
5
- 1 . 启动你的 RabbitMQ 服务和 EventMesh Runtime。
5
+ 1 . 启动你的 RabbitMQ 和 EventMesh Runtime。
6
6
2 . 启用 sinkConnector 并检查 ` sink-config.yml ` 。
7
7
3 . 启动你的 RabbitMQConnectorServer,它将订阅到 EventMesh Runtime 中 ` pubSubConfig.subject ` 中定义的主题,并将数据发送到 RabbitMQ 中的 ` connectorConfig.queueName ` 。
8
- 4 . 使用在 ` pubSubConfig.subject ` 中指定的 Topic,向 EventMesh 发送消息,然后你将在 rabbitmq 中接收到该消息。
8
+ 4 . 使用在 ` pubSubConfig.subject ` 中指定的 Topic,向 EventMesh 发送消息,然后你将在 RabbitMQ 中接收到该消息。
9
9
10
10
``` yaml
11
11
pubSubConfig :
@@ -26,17 +26,17 @@ connectorConfig:
26
26
passwd : passwd
27
27
virtualHost : coyrqpyz
28
28
exchangeType : TOPIC
29
- # 使用内置的 exchangeName 或在连接到 rabbitmq 服务后创建新的 exchangeName。
29
+ # 使用内置的 exchangeName 或在连接到 RabbitMQ 后创建新的 exchangeName。
30
30
exchangeName : amq.topic
31
- # 如果在连接之前不存在,rabbitmq 服务将自动创建 routingKey 和 queueName。
31
+ # 如果在连接之前不存在,RabbitMQ 将自动创建 routingKey 和 queueName。
32
32
routingKey : eventmesh
33
33
queueName : eventmesh
34
34
autoAck : true
35
35
` ` `
36
36
37
37
## RabbitMQSourceConnector:从 RabbitMQ 到 EventMesh
38
38
39
- 1. 启动你的 RabbitMQ 服务和 EventMesh Runtime。
40
- 2. 启用 sourceConnector 并检查 ` source-config.yml`(与 sink-config.yml 基本相同)。
39
+ 1. 启动你的 RabbitMQ 和 EventMesh Runtime。
40
+ 2. 启用 sourceConnector 并检查 ` source-config.yml`(与 sink-config.yml 基本相同)。
41
41
3. 启动你的 RabbitMQConnectorServer,它将订阅到 RabbitMQ 中的 `connectorConfig.queueName`,并将数据发送到 EventMesh Runtime 中的 `pubSubConfig.subject`。
42
42
4. 向队列发送一个 CloudEvent 消息,然后你将在 EventMesh 中接收到该消息。
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pubSubConfig:
21
21
connectorConfig :
22
22
connectorName : redisSink
23
23
server : redis://127.0.0.1:6379
24
- # redis 中的主题
24
+ # Redis 中的主题
25
25
topic : SinkTopic
26
26
` ` `
27
27
Original file line number Diff line number Diff line change @@ -217,8 +217,7 @@ public void tryHTTPRequest() {
217
217
.get (handleMsgContext .getTopic ()).getHttpAuthTypeMap ().get (currPushUrl );
218
218
219
219
WebhookUtil .setWebhookHeaders (builder , httpEntity .getContentType ().getValue (),
220
- eventMeshHttpConfiguration .getEventMeshWebhookOrigin (),
221
- urlAuthType );
220
+ eventMeshHttpConfiguration .getEventMeshWebhookOrigin (), urlAuthType );
222
221
223
222
eventMeshHTTPServer .getMetrics ().getSummaryMetrics ().recordPushMsg ();
224
223
You can’t perform that action at this time.
0 commit comments