This is an automated email from the ASF dual-hosted git repository.
mxsm 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 dd4022729 [ISSUE #4171]support pulsar connector (#4186)
dd4022729 is described below
commit dd40227299773c40d92ae86a484d5ec4f7df4980
Author: 郭中奇 <[email protected]>
AuthorDate: Tue Aug 1 11:26:58 2023 +0800
[ISSUE #4171]support pulsar connector (#4186)
---
.../eventmesh-connector-pulsar/build.gradle | 26 +++++
.../eventmesh-connector-pulsar/gradle.properties | 17 +++
.../pulsar/config/PulsarServerConfig.java | 30 ++++++
.../pulsar/server/PulsarConnectServer.java | 46 ++++++++
.../pulsar/sink/config/PulsarSinkConfig.java | 31 ++++++
.../pulsar/sink/config/SinkConnectorConfig.java | 30 ++++++
.../pulsar/sink/connector/PulsarSinkConnector.java | 103 ++++++++++++++++++
.../pulsar/source/config/PulsarSourceConfig.java | 29 +++++
.../source/config/SourceConnectorConfig.java | 29 +++++
.../source/connector/PulsarSourceConnector.java | 117 +++++++++++++++++++++
.../src/main/resources/server-config.yml | 19 ++++
.../src/main/resources/sink-config.yml | 30 ++++++
.../src/main/resources/source-config.yml | 30 ++++++
settings.gradle | 1 +
14 files changed, 538 insertions(+)
diff --git a/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle
b/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle
new file mode 100644
index 000000000..4a532ec2b
--- /dev/null
+++ b/eventmesh-connectors/eventmesh-connector-pulsar/build.gradle
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+List pulsar = [
+ "org.apache.pulsar:pulsar-client:$pulsar_version"
+]
+dependencies {
+ implementation project(":eventmesh-openconnect:eventmesh-openconnect-java")
+ implementation pulsar
+ compileOnly 'org.projectlombok:lombok'
+ annotationProcessor 'org.projectlombok:lombok'
+}
\ No newline at end of file
diff --git a/eventmesh-connectors/eventmesh-connector-pulsar/gradle.properties
b/eventmesh-connectors/eventmesh-connector-pulsar/gradle.properties
new file mode 100644
index 000000000..1d24d4b77
--- /dev/null
+++ b/eventmesh-connectors/eventmesh-connector-pulsar/gradle.properties
@@ -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.
+#
+pulsar_version=2.11.1
\ No newline at end of file
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/PulsarServerConfig.java
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/PulsarServerConfig.java
new file mode 100644
index 000000000..3efea5327
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/config/PulsarServerConfig.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.pulsar.config;
+
+
+import org.apache.eventmesh.openconnect.api.config.Config;
+
+import lombok.Data;
+
+@Data
+public class PulsarServerConfig extends Config {
+ private boolean sourceEnable;
+
+ private boolean sinkEnable;
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/server/PulsarConnectServer.java
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/server/PulsarConnectServer.java
new file mode 100644
index 000000000..31a6c6c4c
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/server/PulsarConnectServer.java
@@ -0,0 +1,46 @@
+/*
+ * 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.pulsar.server;
+
+
+import org.apache.eventmesh.connector.pulsar.config.PulsarServerConfig;
+import
org.apache.eventmesh.connector.pulsar.sink.connector.PulsarSinkConnector;
+import org.apache.eventmesh.openconnect.Application;
+import org.apache.eventmesh.openconnect.util.ConfigUtil;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class PulsarConnectServer {
+
+
+ public static void main(String[] args) throws Exception {
+
+ PulsarServerConfig serverConfig =
ConfigUtil.parse(PulsarServerConfig.class, "server-config.yml");
+
+ if (serverConfig.isSourceEnable()) {
+ Application rocketmqSourceApp = new Application();
+ rocketmqSourceApp.run(PulsarSinkConnector.class);
+ }
+
+ if (serverConfig.isSinkEnable()) {
+ Application rocketmqSinkApp = new Application();
+ rocketmqSinkApp.run(PulsarSinkConnector.class);
+ }
+ }
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/sink/config/PulsarSinkConfig.java
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/sink/config/PulsarSinkConfig.java
new file mode 100644
index 000000000..bdb21833d
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/sink/config/PulsarSinkConfig.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.pulsar.sink.config;
+
+
+
+import org.apache.eventmesh.openconnect.api.config.SinkConfig;
+
+import lombok.Data;
+
+@Data
+public class PulsarSinkConfig extends SinkConfig {
+
+ public SinkConnectorConfig connectorConfig;
+
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/sink/config/SinkConnectorConfig.java
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/sink/config/SinkConnectorConfig.java
new file mode 100644
index 000000000..e1ebba09c
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/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.pulsar.sink.config;
+
+import lombok.Data;
+
+@Data
+public class SinkConnectorConfig {
+
+ private String connectorName;
+
+ private String serviceUrl;
+
+ private String topic;
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/sink/connector/PulsarSinkConnector.java
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/sink/connector/PulsarSinkConnector.java
new file mode 100644
index 000000000..1c46effb5
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/sink/connector/PulsarSinkConnector.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.pulsar.sink.connector;
+
+
+
+import org.apache.eventmesh.connector.pulsar.sink.config.PulsarSinkConfig;
+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 org.apache.pulsar.client.api.MessageId;
+import org.apache.pulsar.client.api.Producer;
+import org.apache.pulsar.client.api.PulsarClient;
+import org.apache.pulsar.client.api.PulsarClientException;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class PulsarSinkConnector implements Sink {
+
+ private PulsarSinkConfig sinkConfig;
+
+ private Producer<byte[]> producer;
+
+ @Override
+ public Class<? extends Config> configClass() {
+ return PulsarSinkConfig.class;
+ }
+
+ @Override
+ public void init(Config config) throws Exception {
+ // init config for pulsar source connector
+ this.sinkConfig = (PulsarSinkConfig) config;
+ PulsarClient client = PulsarClient.builder()
+ .serviceUrl(sinkConfig.getConnectorConfig().getServiceUrl())
+ .build();
+ producer = client.newProducer()
+ .topic(sinkConfig.getConnectorConfig().getTopic())
+ .create();
+ }
+
+ @Override
+ public void start() throws Exception {
+ }
+
+ @Override
+ public void commit(ConnectRecord record) {
+
+ }
+
+ @Override
+ public String name() {
+ return this.sinkConfig.getConnectorConfig().getConnectorName();
+ }
+
+ @Override
+ public void stop() {
+ try {
+ producer.close();
+ } catch (PulsarClientException e) {
+ log.error("close pulsar producer failed", e);
+ }
+ }
+
+ @Override
+ public void put(List<ConnectRecord> sinkRecords) {
+ for (ConnectRecord connectRecord : sinkRecords) {
+ try {
+ Map props = new HashMap<String, Object>();
+ for (String key : connectRecord.getExtensions().keySet()) {
+ props.put(key, connectRecord.getExtension(key));
+ }
+ MessageId messageId = producer.newMessage()
+ .value((byte[]) connectRecord.getData())
+ .properties(props)
+ .send();
+ } catch (Exception e) {
+ log.error("put records to pulsar failed", e);
+ }
+ }
+ }
+
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/config/PulsarSourceConfig.java
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/config/PulsarSourceConfig.java
new file mode 100644
index 000000000..ec068459e
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/config/PulsarSourceConfig.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.pulsar.source.config;
+
+
+import org.apache.eventmesh.openconnect.api.config.SourceConfig;
+
+import lombok.Data;
+
+@Data
+public class PulsarSourceConfig extends SourceConfig {
+
+ public SourceConnectorConfig connectorConfig;
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/config/SourceConnectorConfig.java
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/config/SourceConnectorConfig.java
new file mode 100644
index 000000000..b34113783
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/config/SourceConnectorConfig.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.pulsar.source.config;
+
+import lombok.Data;
+
+@Data
+public class SourceConnectorConfig {
+ private String connectorName;
+
+ private String serviceUrl;
+
+ private String topic;
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/connector/PulsarSourceConnector.java
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/connector/PulsarSourceConnector.java
new file mode 100644
index 000000000..6acaec07b
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/java/org/apache/eventmesh/connector/pulsar/source/connector/PulsarSourceConnector.java
@@ -0,0 +1,117 @@
+/*
+ * 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.pulsar.source.connector;
+
+
+import org.apache.eventmesh.connector.pulsar.source.config.PulsarSourceConfig;
+import org.apache.eventmesh.openconnect.api.config.Config;
+import org.apache.eventmesh.openconnect.api.data.ConnectRecord;
+import org.apache.eventmesh.openconnect.api.data.RecordPartition;
+import org.apache.eventmesh.openconnect.api.source.Source;
+
+import org.apache.pulsar.client.api.Consumer;
+import org.apache.pulsar.client.api.Message;
+import org.apache.pulsar.client.api.Messages;
+import org.apache.pulsar.client.api.PulsarClient;
+import org.apache.pulsar.client.api.PulsarClientException;
+
+
+
+
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+public class PulsarSourceConnector implements Source {
+
+ private PulsarSourceConfig sourceConfig;
+
+ private Consumer consumer;
+
+ @Override
+ public Class<? extends Config> configClass() {
+ return PulsarSourceConfig.class;
+ }
+
+ @Override
+ public void init(Config config) throws Exception {
+ // init config for rocketmq source connector
+ this.sourceConfig = (PulsarSourceConfig) config;
+ PulsarClient client = PulsarClient.builder()
+ .serviceUrl(sourceConfig.getConnectorConfig().getServiceUrl())
+ .build();
+ consumer = client.newConsumer()
+ .topic(sourceConfig.connectorConfig.getTopic())
+ .subscriptionName(sourceConfig.getPubSubConfig().getGroup())
+ .subscribe();
+ }
+
+ @Override
+ public void start() throws Exception {
+ }
+
+ @Override
+ public void commit(ConnectRecord record) {
+
+ }
+
+ @Override
+ public String name() {
+ return this.sourceConfig.getConnectorConfig().getConnectorName();
+ }
+
+ @Override
+ public void stop() {
+ try {
+ consumer.close();
+ } catch (PulsarClientException e) {
+ log.error("close pulsar consumer failed", e);
+ }
+ }
+
+ @Override
+ public List<ConnectRecord> poll() {
+ List<ConnectRecord> connectRecords = new ArrayList<>();
+ try {
+ Messages messages = consumer.batchReceive();
+ for (Object msg : messages) {
+ Long timestamp = System.currentTimeMillis();
+ Message message = (Message) msg;
+ byte[] body = message.getData();
+ String bodyStr = new String(body, StandardCharsets.UTF_8);
+ Map<String, String> map = new HashMap<>();
+ map.put("topic", consumer.getTopic());
+ map.put("queueId", String.valueOf(message.getSequenceId()));
+ RecordPartition partition = new RecordPartition(map);
+ ConnectRecord connectRecord = new ConnectRecord(partition,
null, timestamp, bodyStr);
+ connectRecord.addExtension("topic", consumer.getTopic());
+ connectRecords.add(connectRecord);
+ }
+ consumer.acknowledge(messages);
+ } catch (PulsarClientException e) {
+ log.error("consumer msg from pulsar failed", e);
+ }
+ return connectRecords;
+ }
+
+}
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/resources/server-config.yml
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/resources/server-config.yml
new file mode 100644
index 000000000..5f66dd0f6
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/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-pulsar/src/main/resources/sink-config.yml
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/resources/sink-config.yml
new file mode 100644
index 000000000..e716e496d
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/resources/sink-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: pulsarSink
+ appId: 5031
+ userName: pulsarSinkUser
+ passWord: pulsarPassWord
+sinkConnectorConfig:
+ connectorName: pulsarSink
+ serviceUrl: 127.0.0.1:6650
+ topic: TopicTest
diff --git
a/eventmesh-connectors/eventmesh-connector-pulsar/src/main/resources/source-config.yml
b/eventmesh-connectors/eventmesh-connector-pulsar/src/main/resources/source-config.yml
new file mode 100644
index 000000000..c4bd62595
--- /dev/null
+++
b/eventmesh-connectors/eventmesh-connector-pulsar/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: pulsarSource
+ appId: 5032
+ userName: rocketmqSourceUser
+ passWord: rocketmqPassWord
+sourceConnectorConfig:
+ connectorName: pulsarSource
+ serviceUrl: 127.0.0.1:6650
+ topic: TopicTest
diff --git a/settings.gradle b/settings.gradle
index d19941a87..555b7becd 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -27,6 +27,7 @@ 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-pulsar'
include 'eventmesh-connectors:eventmesh-connector-kafka'
include 'eventmesh-storage-plugin:eventmesh-storage-api'
include 'eventmesh-storage-plugin:eventmesh-storage-standalone'
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]