You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2026/09/16 03:48:55 UTC

(eventmesh-site) branch master updated: [ISSUE apache/eventmesh#4614] [Doc] Add Pulsar connector documentation (#262)

This is an automated email from the ASF dual-hosted git repository.

qqeasonchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b4ed2186 [ISSUE apache/eventmesh#4614] [Doc] Add Pulsar connector documentation (#262)
9b4ed2186 is described below

commit 9b4ed2186b66204b16a4f0c6524b8ce94f83dfdf
Author: Abdullah <89...@users.noreply.github.com>
AuthorDate: Wed Sep 16 06:48:49 2026 +0300

    [ISSUE apache/eventmesh#4614] [Doc] Add Pulsar connector documentation (#262)
    
    Document eventmesh-connector-pulsar under design-document/03-connect (EN+ZH).
---
 .../03-connect/15-pulsar-connector.md              | 73 ++++++++++++++++++++++
 .../03-connect/15-pulsar-connector.md              | 73 ++++++++++++++++++++++
 2 files changed, 146 insertions(+)

diff --git a/docs/design-document/03-connect/15-pulsar-connector.md b/docs/design-document/03-connect/15-pulsar-connector.md
new file mode 100644
index 000000000..f62a667ba
--- /dev/null
+++ b/docs/design-document/03-connect/15-pulsar-connector.md
@@ -0,0 +1,73 @@
+# Pulsar
+
+`eventmesh-connector-pulsar` is a source and sink connector. The source consumes messages from a Pulsar topic and publishes them to EventMesh. The sink takes events from EventMesh and produces them to Pulsar.
+
+## PulsarSinkConnector: From EventMesh to Pulsar
+
+1. Start Pulsar and EventMesh Runtime.
+2. Enable sinkConnector (`sinkEnable: true` in `server-config.yml`) and check `sink-config.yml`.
+3. Start `PulsarConnectServer`. It subscribes to `pubSubConfig.subject` in EventMesh Runtime and publishes each record to `connectorConfig.topic` in Pulsar.
+4. Send a message to EventMesh on that subject; it appears on the Pulsar topic.
+
+```yaml
+pubSubConfig:
+  meshAddress: 127.0.0.1:10000
+  subject: TopicTest
+  idc: FT
+  env: PRD
+  group: pulsarSink
+  appId: 5031
+  userName: pulsarSinkUser
+  passWord: pulsarPassWord
+connectorConfig:
+  connectorName: pulsarSink
+  serviceUrl: 127.0.0.1:6650
+  topic: TopicTest
+```
+
+## PulsarSourceConnector: From Pulsar to EventMesh
+
+1. Start Pulsar and EventMesh Runtime.
+2. Enable sourceConnector (`sourceEnable: true` in `server-config.yml`) and check `source-config.yml`.
+3. Start `PulsarConnectServer`. It subscribes to Pulsar `connectorConfig.topic` with subscription name `pubSubConfig.group` and sends each message to `pubSubConfig.subject` in EventMesh Runtime.
+4. Send a message to that Pulsar topic; it appears in EventMesh.
+
+```yaml
+pubSubConfig:
+  meshAddress: 127.0.0.1:10000
+  subject: TopicTest
+  idc: FT
+  env: PRD
+  group: pulsarSource
+  appId: 5032
+  userName: pulsarSourceUser
+  passWord: pulsarPassWord
+connectorConfig:
+  connectorName: pulsarSource
+  serviceUrl: 127.0.0.1:6650
+  topic: TopicTest
+```
+
+### Configuration
+
+`pubSubConfig` is the EventMesh TCP client used to publish into or subscribe from Runtime. `connectorConfig` fields:
+
+- `connectorName`: name of the connector.
+- `serviceUrl`: Pulsar broker address passed to `PulsarClient.builder().serviceUrl()`.
+- `topic`: Pulsar topic to produce (sink) or consume (source).
+
+The source subscription name is `pubSubConfig.group`.
+
+### Precautions
+
+- Bundled `server-config.yml` sets `sourceEnable: true` and `sinkEnable: true`. Turn off the side you are not running.
+- Create the Pulsar topic first, or enable auto-topic creation on the broker.
+- `serviceUrl` is the Pulsar binary protocol address (commonly `pulsar://host:6650`). The sample uses `127.0.0.1:6650`.
+- This connector does not set token or TLS auth. The broker must accept an unauthenticated client.
+- Source `poll` uses `consumer.batchReceive()` and acknowledges the batch after building records.
+- Sink `put` sends each record as a Pulsar message. CloudEvent extensions become message properties.
+
+### Official references
+
+- [Pulsar Java client](https://pulsar.apache.org/docs/client-libraries-java/)
+- [Messaging concepts](https://pulsar.apache.org/docs/concepts-messaging/)
diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/15-pulsar-connector.md b/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/15-pulsar-connector.md
new file mode 100644
index 000000000..064f8cc16
--- /dev/null
+++ b/i18n/zh/docusaurus-plugin-content-docs/current/design-document/03-connect/15-pulsar-connector.md
@@ -0,0 +1,73 @@
+# Pulsar
+
+`eventmesh-connector-pulsar` 同时提供 Source 和 Sink。Source 从 Pulsar Topic 消费消息并发布到 EventMesh;Sink 从 EventMesh 接收事件并写入 Pulsar。
+
+## PulsarSinkConnector:从 EventMesh 到 Pulsar
+
+1. 启动 Pulsar 和 EventMesh Runtime。
+2. 启用 sinkConnector(在 `server-config.yml` 中设置 `sinkEnable: true`)并检查 `sink-config.yml`。
+3. 启动 `PulsarConnectServer`。它会订阅 EventMesh Runtime 中 `pubSubConfig.subject` 指定的 Topic,并把每条记录发布到 Pulsar 的 `connectorConfig.topic`。
+4. 向 EventMesh 的该 Topic 发送消息后,可在 Pulsar Topic 上看到它。
+
+```yaml
+pubSubConfig:
+  meshAddress: 127.0.0.1:10000
+  subject: TopicTest
+  idc: FT
+  env: PRD
+  group: pulsarSink
+  appId: 5031
+  userName: pulsarSinkUser
+  passWord: pulsarPassWord
+connectorConfig:
+  connectorName: pulsarSink
+  serviceUrl: 127.0.0.1:6650
+  topic: TopicTest
+```
+
+## PulsarSourceConnector:从 Pulsar 到 EventMesh
+
+1. 启动 Pulsar 和 EventMesh Runtime。
+2. 启用 sourceConnector(在 `server-config.yml` 中设置 `sourceEnable: true`)并检查 `source-config.yml`。
+3. 启动 `PulsarConnectServer`。它会以 `pubSubConfig.group` 为订阅名消费 Pulsar 的 `connectorConfig.topic`,并把每条消息发送到 EventMesh Runtime 中 `pubSubConfig.subject` 指定的 Topic。
+4. 向该 Pulsar Topic 发送消息后,可在 EventMesh 中收到它。
+
+```yaml
+pubSubConfig:
+  meshAddress: 127.0.0.1:10000
+  subject: TopicTest
+  idc: FT
+  env: PRD
+  group: pulsarSource
+  appId: 5032
+  userName: pulsarSourceUser
+  passWord: pulsarPassWord
+connectorConfig:
+  connectorName: pulsarSource
+  serviceUrl: 127.0.0.1:6650
+  topic: TopicTest
+```
+
+### 配置项
+
+`pubSubConfig` 是与 Runtime 交互的 EventMesh TCP 客户端配置。`connectorConfig` 字段:
+
+- `connectorName`:连接器名称。
+- `serviceUrl`:传给 `PulsarClient.builder().serviceUrl()` 的 Pulsar broker 地址。
+- `topic`:Sink 写入或 Source 消费的 Pulsar Topic。
+
+Source 的订阅名是 `pubSubConfig.group`。
+
+### 注意事项
+
+- 自带的 `server-config.yml` 中 `sourceEnable: true`、`sinkEnable: true`。不需要的一侧请关掉。
+- 请先在 Pulsar 上创建 Topic,或打开 broker 的自动创建。
+- `serviceUrl` 是 Pulsar 二进制协议地址(常见形式 `pulsar://host:6650`)。示例使用 `127.0.0.1:6650`。
+- 该连接器不配置 token 或 TLS 认证。broker 需要接受未认证客户端。
+- Source 的 `poll` 使用 `consumer.batchReceive()`,组装记录后对整批 ack。
+- Sink 的 `put` 把每条记录作为 Pulsar 消息发送。CloudEvent 扩展会写成消息 properties。
+
+### 官方参考
+
+- [Pulsar Java 客户端](https://pulsar.apache.org/docs/client-libraries-java/)
+- [消息概念](https://pulsar.apache.org/docs/concepts-messaging/)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org