Skip to content

Commit

Permalink
[ISSUE apache#4683] Documentation Needed for eventmesh-connector-redis (
Browse files Browse the repository at this point in the history
apache#4684)

* feat: Add doc for eventmesh-connector-redis

* feat: Add doc for eventmesh-connector-redis

* feat: Add doc for eventmesh-connector-redis

* feat: Add doc for eventmesh-connector-redis
  • Loading branch information
fabian4 authored Dec 22, 2023
1 parent 2989941 commit 1a381ed
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 11 deletions.
1 change: 1 addition & 0 deletions eventmesh-connectors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Connector

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.
Connector runs as a standalone service by `main()`.

## Source

Expand Down
2 changes: 1 addition & 1 deletion eventmesh-connectors/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 连接器类型

连接器是代表用户应用程序与特定外部服务或底层数据源(例如数据库)交互的镜像或实例。连接器的类型可以是源(Source)或汇(Sink)。
连接器是代表用户应用程序与特定外部服务或底层数据源(例如数据库)交互的镜像或实例。连接器的类型可以是源(Source)或汇(Sink)。连接器通过 `main()` 作为一个独立服务运行

## 数据源(Source 端)

Expand Down
5 changes: 3 additions & 2 deletions eventmesh-connectors/eventmesh-connector-mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

1. launch your MongoDB server and EventMesh Runtime.
2. enable sinkConnector and check `sink-config.yml`.
3. send a message to EventMesh with the topic defined in `pubSubConfig.subject`
3. start your MongoDBConnectorServer, it will subscribe to the topic defined in `pubSubConfig.subject` of EventMesh Runtime and send data to `connectorConfig.collection` in your MongoDB.
4. send a message to EventMesh with the topic defined in `pubSubConfig.subject` and then you will receive the message in MongoDB.

```yaml
pubSubConfig:
Expand All @@ -31,5 +32,5 @@ connectorConfig:
1. launch your MongoDB server and EventMesh Runtime.
2. enable sourceConnector and check `source-config.yml` (Basically the same as `sink-config.yml`)
3. start your `MongoDBSourceConnector` and you are ready to forward message.
3. start your `MongoDBSourceConnector`, it will subscribe to the collection defined in `connectorConfig.collection` in your MongoDB and send data to `pubSubConfig.subject` of EventMesh Runtime.
4. write a CloudEvent message to `yourCol` at `yourDB` in your MongoDB and then you will receive the message in EventMesh.
5 changes: 3 additions & 2 deletions eventmesh-connectors/eventmesh-connector-mongodb/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

1. 启动你的 MongoDB 服务和 EventMesh Runtime。
2. 启用 sinkConnector 并检查 `sink-config.yml`
3. 使用在 `pubSubConfig.subject` 中指定的 Topic,向 EventMesh 发送消息。
3. 启动你的 MongoDBConnectorServer,它将订阅到 EventMesh Runtime 中 `pubSubConfig.subject` 中定义的主题,并将数据发送到 MongoDB 中的 `connectorConfig.collection`
4. 使用在 `pubSubConfig.subject` 中指定的 Topic,向 EventMesh 发送消息,然后你将在 MongoDB 中接收到该消息。

```yaml
pubSubConfig:
Expand All @@ -31,5 +32,5 @@ connectorConfig:
1. 启动你的 MongoDB 服务和 EventMesh Runtime。
2. 启用 sourceConnector 并检查 `source-config.yml`(与 sink-config.yml 基本相同)。
3. 启动你的 MongoDBSourceConnector,现在都已经准备好了。
3. 启动你的 MongoDBSourceConnector,它将订阅到 mongodb 中的 `connectorConfig.collection`,并将数据发送到 EventMesh Runtime 中的 `pubSubConfig.subject`。
4. 向 MongoDB 中 `yourDB` 的 `yourCol` 写入一个 CloudEvent 消息,然后你将在 EventMesh 中接收到该消息。
7 changes: 4 additions & 3 deletions eventmesh-connectors/eventmesh-connector-rabbitmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

1. launch your RabbitMQ server and EventMesh Runtime.
2. enable sinkConnector and check `sink-config.yml`.
3. send a message to EventMesh with the topic defined in `pubSubConfig.subject`
3. start your `RabbitMQConnectorServer`, it will subscribe to the topic defined in `pubSubConfig.subject` of EventMesh Runtime and send data to `connectorConfig.queueName` in your RabbitMQ.
4. send a message to EventMesh with the topic defined in `pubSubConfig.subject` and then you will receive the message in RabbitMQ.

```yaml
pubSubConfig:
Expand Down Expand Up @@ -35,7 +36,7 @@ connectorConfig:
## RabbitMQSourceConnector: From RabbitMQ to EventMesh
1. launch your rabbitmq server and EventMesh Runtime.
1. launch your RabbitMQ server and EventMesh Runtime.
2. enable sourceConnector and check `source-config.yml` (Basically the same as `sink-config.yml`)
3. start your `RabbitMQConnectorServer` and you will find the channel in rabbitmq server.
3. start your `RabbitMQConnectorServer`, it will subscribe to the queue defined in `connectorConfig.queueName` in your RabbitMQ and send data to `pubSubConfig.subject` of EventMesh Runtime.
4. send a CloudEvent message to the queue and then you will receive the message in EventMesh.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

1. 启动你的 RabbitMQ 服务和 EventMesh Runtime。
2. 启用 sinkConnector 并检查 `sink-config.yml`
3. 使用在 `pubSubConfig.subject` 中指定的 Topic,向 EventMesh 发送消息。
3. 启动你的 RabbitMQConnectorServer,它将订阅到 EventMesh Runtime 中 `pubSubConfig.subject` 中定义的主题,并将数据发送到 RabbitMQ 中的 `connectorConfig.queueName`
4. 使用在 `pubSubConfig.subject` 中指定的 Topic,向 EventMesh 发送消息,然后你将在 rabbitmq 中接收到该消息。

```yaml
pubSubConfig:
Expand Down Expand Up @@ -35,7 +36,7 @@ connectorConfig:
## RabbitMQSourceConnector:从 RabbitMQ 到 EventMesh
1. 启动你的 rabbitmq 服务和 EventMesh Runtime。
1. 启动你的 RabbitMQ 服务和 EventMesh Runtime。
2. 启用 sourceConnector 并检查 `source-config.yml`(与 sink-config.yml 基本相同)。
3. 启动你的 RabbitMQConnectorServer,你会在 rabbitmq 服务中找到该 channel。
3. 启动你的 RabbitMQConnectorServer,它将订阅到 RabbitMQ 中的 `connectorConfig.queueName`,并将数据发送到 EventMesh Runtime 中的 `pubSubConfig.subject`。
4. 向队列发送一个 CloudEvent 消息,然后你将在 EventMesh 中接收到该消息。
33 changes: 33 additions & 0 deletions eventmesh-connectors/eventmesh-connector-redis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Redis

## RedisSinkConnector: From EventMesh to Redis topic queue

1. start your Redis instance if needed and EventMesh Runtime.
2. enable sinkConnector and check `sink-config.yml`.
3. start your `RedisConnectServer`, it will subscribe to the topic defined in `pubSubConfig.subject` of EventMesh Runtime and send data to `connectorConfig.topic` in your Redis.
4. send a message to EventMesh with the topic defined in `pubSubConfig.subject` and then you will receive the message in Redis.

```yaml
pubSubConfig:
# default port 10000
meshAddress: your.eventmesh.server:10000
subject: TopicTest
idc: FT
env: PRD
group: redisSink
appId: 5031
userName: redisSinkUser
passWord: redisPassWord
connectorConfig:
connectorName: redisSink
server: redis://127.0.0.1:6379
# the topic in redis
topic: SinkTopic
```
## RedisSourceConnector: From Redis topic queue to EventMesh
1. start your Redis instance if needed and EventMesh Runtime.
2. enable sourceConnector and check `source-config.yml` (Basically the same as `sink-config.yml`)
3. start your `RedisConnectServer`, it will subscribe to the topic defined in `connectorConfig.topic` in your Redis and send data to `pubSubConfig.subject` of EventMesh Runtime.
4. send a CloudEvent message to the topic in Redis, and you will receive the message in EventMesh.
33 changes: 33 additions & 0 deletions eventmesh-connectors/eventmesh-connector-redis/README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Redis

## RedisSinkConnector:从 EventMesh 到 Redis 的消息队列

1. 启动你的 Redis 实例和 EventMesh Runtime。
2. 启用 sinkConnector 并检查 `sink-config.yml`
3. 启动你的 `RedisConnectServer`,它将订阅到 EventMesh Runtime 中 `pubSubConfig.subject` 中定义的主题,并将数据发送到 Redis 中的 `connectorConfig.topic`
4. 使用在 `pubSubConfig.subject` 中指定的 Topic,向 EventMesh 发送消息,然后你将在 Redis 中接收到该消息。

```yaml
pubSubConfig:
# 默认端口 10000
meshAddress: your.eventmesh.server:10000
subject: TopicTest
idc: FT
env: PRD
group: redisSink
appId: 5031
userName: redisSinkUser
passWord: redisPassWord
connectorConfig:
connectorName: redisSink
server: redis://127.0.0.1:6379
# redis 中的主题
topic: SinkTopic
```
## RedisSourceConnector:从 Redis 的消息队列 到 EventMesh
1. 启动你的 Redis 实例和 EventMesh Runtime。
2. 启用 sourceConnector 并检查 `source-config.yml`(与 sink-config.yml 基本相同)。
3. 启动你的 RedisConnectServer,它将订阅到 Redis 中的 `connectorConfig.topic`,并将数据发送到 EventMesh Runtime 中的 `pubSubConfig.subject`
4. 向 Redis 的主题发送一个 CloudEvent 消息,然后你将在 EventMesh 中接收到该消息。

0 comments on commit 1a381ed

Please sign in to comment.