This is an automated email from the ASF dual-hosted git repository.
mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 6df842822 [Feature #4032] Add Redis Connector modules (#4280)
6df842822 is described below
commit 6df842822e51bb4398a68a147a2d40038e0262df
Author: Fabian Bao <[email protected]>
AuthorDate: Thu Jul 27 15:11:19 2023 +0800
[Feature #4032] Add Redis Connector modules (#4280)
* feat: add redis connector.
* feat: add redis connector.
* feat: add redis connector.
* feat: add redis connector.
* feat: add redis connector.
* [ISSUE #4023]Comparison using reference equality instead of value
equality.[Operation] (#4276)
* [ISSUE #4269] Used switch to replace the if-else.
[MeshMessageProtocolAdaptor] (#4270)
* [ISSUE #4269] Used switch to replace the if-else.
[MeshMessageProtocolAdaptor]
* [ISSUE #4269] Used switch to replace the if-else.
[MeshMessageProtocolAdaptor]
* [ISSUE #4269] Used switch to replace the if-else.
[MeshMessageProtocolAdaptor]
* [ISSUE #4269] Used switch to replace the if-else.
[MeshMessageProtocolAdaptor]
* [ISSUE #4099]Refactor re-used constant's usage from dedicated file (#4257)
* [ISSUE #4099]: Refactor re-used constant's usage from dedicated file
* [ISSUE #4099] Rename some constants for mongodb storage plugin
* [ISSUE #4099] Refactor constant imports in mongodb cloud event util
* [ISSUE #4099]: Replace contants imports to class import in mongo cloud
event util
* fix import order.
* fix import order.
* fix import order.
* fix import order.
---------
Co-authored-by: Fabian Bao <[email protected]>
Co-authored-by: kyooosukedn <[email protected]>
Co-authored-by: Sam V Jose <[email protected]>
Co-authored-by: ruhshan <[email protected]>
---
.../eventmesh-connector-redis/build.gradle | 25 +++++
.../eventmesh-connector-redis/gradle.properties | 18 ++++
.../connector/redis/config/RedisServerConfig.java | 31 +++++++
.../connector/redis/server/RedisConnectServer.java | 45 +++++++++
.../redis/sink/config/RedisSinkConfig.java | 29 ++++++
.../redis/sink/config/SinkConnectorConfig.java | 30 ++++++
.../redis/sink/connector/RedisSinkConnector.java | 86 +++++++++++++++++
.../redis/source/config/RedisSourceConfig.java | 29 ++++++
.../redis/source/config/SourceConnectorConfig.java | 31 +++++++
.../source/connector/RedisSourceConnector.java | 103 +++++++++++++++++++++
.../src/main/resources/server-config.yml | 19 ++++
.../src/main/resources/sink-config.yml | 31 +++++++
.../src/main/resources/source-config.yml | 30 ++++++
settings.gradle | 1 +
14 files changed, 508 insertions(+)
diff --git a/eventmesh-connectors/eventmesh-connector-redis/build.gradle
b/eventmesh-connectors/eventmesh-connector-redis/build.gradle
new file mode 100644
index 000000000..8b92940aa
--- /dev/null
+++ b/eventmesh-connectors/eventmesh-connector-redis/build.gradle
@@ -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.
+ */
+
+dependencies {
+ implementation project(":eventmesh-openconnect:eventmesh-openconnect-java")
+
+ implementation 'org.redisson:redisson:3.17.3'
+
+ compileOnly 'org.projectlombok:lombok'
+ annotationProcessor 'org.projectlombok:lombok'
+}
\ No newline at end of file
diff --git a/eventmesh-connectors/eventmesh-connector-redis/gradle.properties
b/eventmesh-connectors/eventmesh-connector-redis/gradle.properties
new file mode 100644
index 000000000..b247804ea
--- /dev/null
+++ b/eventmesh-connectors/eventmesh-connector-redis/gradle.properties
@@ -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=connectors
+pluginName=redis
\ No newline at end of file
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/RedisServerConfig.java
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/RedisServerConfig.java
new file mode 100644
index 000000000..6b55b0e6e
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/config/RedisServerConfig.java
@@ -0,0 +1,31 @@
+/*
+ * 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.connector.redis.config;
+
+import org.apache.eventmesh.openconnect.api.config.Config;
+
+import lombok.Data;
+
+@Data
+public class RedisServerConfig extends Config {
+
+ private boolean sourceEnable;
+
+ private boolean sinkEnable;
+
+}
\ No newline at end of file
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/server/RedisConnectServer.java
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/server/RedisConnectServer.java
new file mode 100644
index 000000000..c9abdb5ee
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/server/RedisConnectServer.java
@@ -0,0 +1,45 @@
+/*
+ * 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.connector.redis.server;
+
+import org.apache.eventmesh.connector.redis.config.RedisServerConfig;
+import org.apache.eventmesh.connector.redis.sink.connector.RedisSinkConnector;
+import
org.apache.eventmesh.connector.redis.source.connector.RedisSourceConnector;
+import org.apache.eventmesh.openconnect.Application;
+import org.apache.eventmesh.openconnect.util.ConfigUtil;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class RedisConnectServer {
+
+ public static void main(String[] args) throws Exception {
+
+ RedisServerConfig serverConfig =
ConfigUtil.parse(RedisServerConfig.class, "server-config.yml");
+
+ if (serverConfig.isSourceEnable()) {
+ Application redisSourceApp = new Application();
+ redisSourceApp.run(RedisSourceConnector.class);
+ }
+
+ if (serverConfig.isSinkEnable()) {
+ Application redisSinkApp = new Application();
+ redisSinkApp.run(RedisSinkConnector.class);
+ }
+ }
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/config/RedisSinkConfig.java
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/config/RedisSinkConfig.java
new file mode 100644
index 000000000..62cddbf31
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/config/RedisSinkConfig.java
@@ -0,0 +1,29 @@
+/*
+ * 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.connector.redis.sink.config;
+
+import org.apache.eventmesh.openconnect.api.config.SinkConfig;
+
+import lombok.Data;
+
+@Data
+public class RedisSinkConfig extends SinkConfig {
+
+ public SinkConnectorConfig connectorConfig;
+
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/config/SinkConnectorConfig.java
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/config/SinkConnectorConfig.java
new file mode 100644
index 000000000..34fb0326a
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/config/SinkConnectorConfig.java
@@ -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.
+ */
+
+package org.apache.eventmesh.connector.redis.sink.config;
+
+import lombok.Data;
+
+@Data
+public class SinkConnectorConfig {
+
+ private String connectorName;
+
+ private String server;
+
+ private String topic;
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/connector/RedisSinkConnector.java
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/connector/RedisSinkConnector.java
new file mode 100644
index 000000000..58466cc97
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/sink/connector/RedisSinkConnector.java
@@ -0,0 +1,86 @@
+/*
+ * 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.connector.redis.sink.connector;
+
+import org.apache.eventmesh.connector.redis.sink.config.RedisSinkConfig;
+import org.apache.eventmesh.openconnect.api.config.Config;
+import org.apache.eventmesh.openconnect.api.data.ConnectRecord;
+import org.apache.eventmesh.openconnect.api.sink.Sink;
+
+import java.util.List;
+
+import org.redisson.Redisson;
+import org.redisson.api.RTopic;
+import org.redisson.api.RedissonClient;
+
+import lombok.extern.slf4j.Slf4j;
+
+
+@Slf4j
+public class RedisSinkConnector implements Sink {
+
+ private RTopic topic;
+
+ private RedisSinkConfig sinkConfig;
+
+ private RedissonClient redissonClient;
+
+ @Override
+ public Class<? extends Config> configClass() {
+ return RedisSinkConfig.class;
+ }
+
+ @Override
+ public void init(Config config) throws Exception {
+ this.sinkConfig = (RedisSinkConfig) config;
+ org.redisson.config.Config redisConfig = new
org.redisson.config.Config();
+
redisConfig.useSingleServer().setAddress(sinkConfig.connectorConfig.getServer());
+ this.redissonClient = Redisson.create(redisConfig);
+ }
+
+ @Override
+ public void start() throws Exception {
+ this.topic =
redissonClient.getTopic(sinkConfig.connectorConfig.getTopic());
+ }
+
+ @Override
+ public void commit(ConnectRecord record) {
+
+ }
+
+ @Override
+ public String name() {
+ return this.sinkConfig.getConnectorConfig().getConnectorName();
+ }
+
+ @Override
+ public void stop() throws Exception {
+ this.redissonClient.shutdown();
+ }
+
+ @Override
+ public void put(List<ConnectRecord> sinkRecords) {
+ for (ConnectRecord connectRecord : sinkRecords) {
+ try {
+ long publish = topic.publish(connectRecord);
+ } catch (Exception e) {
+ log.error("[RedisSinkConnector] sendResult has error : ", e);
+ }
+ }
+ }
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/config/RedisSourceConfig.java
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/config/RedisSourceConfig.java
new file mode 100644
index 000000000..f01a556c9
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/config/RedisSourceConfig.java
@@ -0,0 +1,29 @@
+/*
+ * 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.connector.redis.source.config;
+
+import org.apache.eventmesh.openconnect.api.config.SourceConfig;
+
+import lombok.Data;
+
+@Data
+public class RedisSourceConfig extends SourceConfig {
+
+ public SourceConnectorConfig connectorConfig;
+
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/config/SourceConnectorConfig.java
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/config/SourceConnectorConfig.java
new file mode 100644
index 000000000..9913e1632
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/config/SourceConnectorConfig.java
@@ -0,0 +1,31 @@
+/*
+ * 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.connector.redis.source.config;
+
+import lombok.Data;
+
+@Data
+public class SourceConnectorConfig {
+
+ private String connectorName;
+
+ private String server;
+
+ private String topic;
+
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/connector/RedisSourceConnector.java
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/connector/RedisSourceConnector.java
new file mode 100644
index 000000000..eca1c23c3
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/java/org/apache/eventmesh/connector/redis/source/connector/RedisSourceConnector.java
@@ -0,0 +1,103 @@
+/*
+ * 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.connector.redis.source.connector;
+
+import org.apache.eventmesh.connector.redis.source.config.RedisSourceConfig;
+import org.apache.eventmesh.openconnect.api.config.Config;
+import org.apache.eventmesh.openconnect.api.data.ConnectRecord;
+import org.apache.eventmesh.openconnect.api.source.Source;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+
+import org.redisson.Redisson;
+import org.redisson.api.RTopic;
+import org.redisson.api.RedissonClient;
+
+
+
+public class RedisSourceConnector implements Source {
+
+ private static final int DEFAULT_BATCH_SIZE = 10;
+
+ private RTopic topic;
+
+ private RedisSourceConfig sourceConfig;
+
+ private RedissonClient redissonClient;
+
+ private BlockingQueue<ConnectRecord> queue;
+
+ @Override
+ public Class<? extends Config> configClass() {
+ return RedisSourceConfig.class;
+ }
+
+ @Override
+ public void init(Config config) throws Exception {
+ this.sourceConfig = (RedisSourceConfig) config;
+ org.redisson.config.Config redisConfig = new
org.redisson.config.Config();
+
redisConfig.useSingleServer().setAddress(sourceConfig.connectorConfig.getServer());
+ this.redissonClient = Redisson.create(redisConfig);
+ this.queue = new LinkedBlockingQueue<>(1000);
+ }
+
+ @Override
+ public void start() throws Exception {
+ this.topic =
redissonClient.getTopic(sourceConfig.connectorConfig.getTopic());
+ this.topic.addListener(ConnectRecord.class, (channel, msg) -> {
+ queue.add(msg);
+ });
+ }
+
+ @Override
+ public void commit(ConnectRecord record) {
+
+ }
+
+ @Override
+ public String name() {
+ return this.sourceConfig.getConnectorConfig().getConnectorName();
+ }
+
+ @Override
+ public void stop() throws Exception {
+ this.topic.removeAllListeners();
+ this.redissonClient.shutdown();
+ }
+
+ @Override
+ public List<ConnectRecord> poll() {
+ List<ConnectRecord> connectRecords = new
ArrayList<>(DEFAULT_BATCH_SIZE);
+ for (int count = 0; count < DEFAULT_BATCH_SIZE; ++count) {
+ try {
+ ConnectRecord connectRecord = queue.poll(3, TimeUnit.SECONDS);
+ if (connectRecord == null) {
+ break;
+ }
+ connectRecords.add(connectRecord);
+ } catch (InterruptedException e) {
+ break;
+ }
+ }
+ return connectRecords;
+ }
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/server-config.yml
b/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/server-config.yml
new file mode 100644
index 000000000..5f66dd0f6
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/server-config.yml
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+sourceEnable: true
+sinkEnable: true
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/sink-config.yml
b/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/sink-config.yml
new file mode 100644
index 000000000..920f92e22
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/sink-config.yml
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+
+pubSubConfig:
+ meshAddress: 127.0.0.1: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
+ topic: TopicTest
+
diff --git
a/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/source-config.yml
b/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/source-config.yml
new file mode 100644
index 000000000..1f08068db
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-redis/src/main/resources/source-config.yml
@@ -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.
+#
+
+pubSubConfig:
+ meshAddress: 127.0.0.1:10000
+ subject: TopicTest
+ idc: FT
+ env: PRD
+ group: redisSource
+ appId: 5032
+ userName: redisSourceUser
+ passWord: redisPassWord
+connectorConfig:
+ connectorName: redisSource
+ server: redis://127.0.0.1:6379
+ topic: TopicTest
diff --git a/settings.gradle b/settings.gradle
index 84ee32037..d19941a87 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -25,6 +25,7 @@ include 'eventmesh-examples'
include 'eventmesh-spi'
include 'eventmesh-openconnect:eventmesh-openconnect-java'
include 'eventmesh-connectors:eventmesh-connector-rocketmq'
+include 'eventmesh-connectors:eventmesh-connector-redis'
include 'eventmesh-connectors:eventmesh-connector-openfunction'
include 'eventmesh-connectors:eventmesh-connector-kafka'
include 'eventmesh-storage-plugin:eventmesh-storage-api'
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]