You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by vi...@apache.org on 2024/03/12 07:58:32 UTC
(pulsar-site) branch main updated: Add the operation steps of RabbitMQ source connector. (#839)
This is an automated email from the ASF dual-hosted git repository.
visortelle pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
The following commit(s) were added to refs/heads/main by this push:
new 78ae188c4a33 Add the operation steps of RabbitMQ source connector. (#839)
78ae188c4a33 is described below
commit 78ae188c4a33281f36ee0ab8d2859dfe2195fa57
Author: Yajun Zhao <92...@users.noreply.github.com>
AuthorDate: Tue Mar 12 15:58:26 2024 +0800
Add the operation steps of RabbitMQ source connector. (#839)
* Add the operation steps of the RabbitMQ source connector.
---------
Co-authored-by: T2938 <zh...@tongtech.com>
---
docs/io-rabbitmq-source.md | 101 +++++++++++++++++++++
.../version-2.10.x/io-rabbitmq-source.md | 101 +++++++++++++++++++++
.../version-2.11.x/io-rabbitmq-source.md | 101 +++++++++++++++++++++
versioned_docs/version-2.8.x/io-rabbitmq-source.md | 101 +++++++++++++++++++++
versioned_docs/version-2.9.x/io-rabbitmq-source.md | 101 +++++++++++++++++++++
versioned_docs/version-3.0.x/io-rabbitmq-source.md | 101 +++++++++++++++++++++
versioned_docs/version-3.1.x/io-rabbitmq-source.md | 101 +++++++++++++++++++++
versioned_docs/version-3.2.x/io-rabbitmq-source.md | 101 +++++++++++++++++++++
8 files changed, 808 insertions(+)
diff --git a/docs/io-rabbitmq-source.md b/docs/io-rabbitmq-source.md
index 65732703b6f5..284529ef6657 100644
--- a/docs/io-rabbitmq-source.md
+++ b/docs/io-rabbitmq-source.md
@@ -85,3 +85,104 @@ Before using the RabbitMQ source connector, you need to create a configuration f
passive: "false"
```
+## Usage
+
+
+### Standalone mode
+
+This example describes how to use the RabbitMQ source connector to feed data from RabbitMQ and write data to Pulsar topics in the standalone mode.
+
+#### Prerequisites
+
+- There is a RabbitMQ server with some history messages in the queue.
+
+#### Steps
+
+1. Get a Pulsar package and start Pulsar in standalone mode.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/apache-pulsar-@pulsar:version@-bin.tar.gz
+ tar xvfz apache-pulsar-@pulsar:version@-bin.tar.gz
+ cd apache-pulsar-@pulsar:version@
+ bin/pulsar standalone
+ ```
+
+2. Download the [nar package](https://archive.apache.org/dist/pulsar/) corresponding to Pulsar's version and copy the following file to Pulsar's directory.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/connectors/pulsar-io-rabbitmq-@pulsar:version@.nar
+ cp pulsar-io-rabbitmq-@pulsar:version@.nar ./connectors
+ ```
+
+3. Messages published to a topic lacking at least one durable subscription are automatically marked as ready for deletion by default. We can set a retention policy at the namespace level to prevent this.
+
+ ```bash
+ ./bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
+ ```
+
+
+4. Prepare a configuration file with name is _rabbitmq-source-queue-name.yaml_.
+ ```yaml
+ configs:
+ host: "localhost"
+ port: 5672
+ virtualHost: "/"
+ username: "guest"
+ password: "guest"
+ queueName: "test-queue"
+ connectionName: "test-connection"
+ requestedChannelMax: 0
+ requestedFrameMax: 0
+ connectionTimeout: 60000
+ handshakeTimeout: 10000
+ requestedHeartbeat: 60
+ prefetchCount: 0
+ prefetchGlobal: "false"
+ passive: "false"
+ ```
+
+ Copy the configuration file to Pulsar‘s conf directory.
+ ```bash
+ cp rabbitmq-source-queue-name.yaml ./conf
+ ```
+
+5. Open a new terminal window and start the connector in local run mode.
+
+ ```bash
+ ./bin/pulsar-admin source localrun \
+ --source-config-file conf/rabbitmq-source-queue-name.yaml \
+ --archive connectors/pulsar-io-rabbitmq-@pulsar:version@.nar \
+ --name rabbitmq-source \
+ --destination-topic-name pulsar-rabbitmq-test-topic \
+ --broker-service-url pulsar://{ip}:{port}
+ ```
+
+6. Open a new terminal window and check the topic is created automatically.
+
+ ```bash
+ ./bin/pulsar-admin topics list public/default \
+ ```
+
+ This topic is created automatically as follows:
+
+ ```bash
+ persistent://public/default/pulsar-rabbitmq-test-topic-partition-0
+ ```
+
+7. Consume this topic.
+
+ ```bash
+ ./bin/pulsar-client consume persistent://public/default/pulsar-rabbitmq-test-topic-partition-0 -s s1 -n 0 -p Earliest
+ ```
+
+ The following information appears on the consumer terminal window.
+
+ ```bash
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 0
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 1
+
+ ... ...
+
+ ```
diff --git a/versioned_docs/version-2.10.x/io-rabbitmq-source.md b/versioned_docs/version-2.10.x/io-rabbitmq-source.md
index d6eab9429d72..70341e313230 100644
--- a/versioned_docs/version-2.10.x/io-rabbitmq-source.md
+++ b/versioned_docs/version-2.10.x/io-rabbitmq-source.md
@@ -85,3 +85,104 @@ Before using the RabbitMQ source connector, you need to create a configuration f
```
+## Usage
+
+
+### Standalone mode
+
+This example describes how to use the RabbitMQ source connector to feed data from RabbitMQ and write data to Pulsar topics in the standalone mode.
+
+#### Prerequisites
+
+- There is a RabbitMQ server with some history messages in the queue.
+
+#### Steps
+
+1. Get a Pulsar package and start Pulsar in standalone mode.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/apache-pulsar-@pulsar:version@-bin.tar.gz
+ tar xvfz apache-pulsar-@pulsar:version@-bin.tar.gz
+ cd apache-pulsar-@pulsar:version@
+ bin/pulsar standalone
+ ```
+
+2. Download the [nar package](https://archive.apache.org/dist/pulsar/) corresponding to Pulsar's version and copy the following file to Pulsar's directory.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/connectors/pulsar-io-rabbitmq-@pulsar:version@.nar
+ cp pulsar-io-rabbitmq-@pulsar:version@.nar ./connectors
+ ```
+
+3. Messages published to a topic lacking at least one durable subscription are automatically marked as ready for deletion by default. We can set a retention policy at the namespace level to prevent this.
+
+ ```bash
+ ./bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
+ ```
+
+
+4. Prepare a configuration file with name is _rabbitmq-source-queue-name.yaml_.
+ ```yaml
+ configs:
+ host: "localhost"
+ port: 5672
+ virtualHost: "/"
+ username: "guest"
+ password: "guest"
+ queueName: "test-queue"
+ connectionName: "test-connection"
+ requestedChannelMax: 0
+ requestedFrameMax: 0
+ connectionTimeout: 60000
+ handshakeTimeout: 10000
+ requestedHeartbeat: 60
+ prefetchCount: 0
+ prefetchGlobal: "false"
+ passive: "false"
+ ```
+
+ Copy the configuration file to Pulsar‘s conf directory.
+ ```bash
+ cp rabbitmq-source-queue-name.yaml ./conf
+ ```
+
+5. Open a new terminal window and start the connector in local run mode.
+
+ ```bash
+ ./bin/pulsar-admin source localrun \
+ --source-config-file conf/rabbitmq-source-queue-name.yaml \
+ --archive connectors/pulsar-io-rabbitmq-@pulsar:version@.nar \
+ --name rabbitmq-source \
+ --destination-topic-name pulsar-rabbitmq-test-topic \
+ --broker-service-url pulsar://{ip}:{port}
+ ```
+
+6. Open a new terminal window and check the topic is created automatically.
+
+ ```bash
+ ./bin/pulsar-admin topics list public/default \
+ ```
+
+ This topic is created automatically as follows:
+
+ ```bash
+ persistent://public/default/pulsar-rabbitmq-test-topic-partition-0
+ ```
+
+7. Consume this topic.
+
+ ```bash
+ ./bin/pulsar-client consume persistent://public/default/pulsar-rabbitmq-test-topic-partition-0 -s s1 -n 0 -p Earliest
+ ```
+
+ The following information appears on the consumer terminal window.
+
+ ```bash
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 0
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 1
+
+ ... ...
+
+ ```
diff --git a/versioned_docs/version-2.11.x/io-rabbitmq-source.md b/versioned_docs/version-2.11.x/io-rabbitmq-source.md
index 65732703b6f5..b926dcee5852 100644
--- a/versioned_docs/version-2.11.x/io-rabbitmq-source.md
+++ b/versioned_docs/version-2.11.x/io-rabbitmq-source.md
@@ -85,3 +85,104 @@ Before using the RabbitMQ source connector, you need to create a configuration f
passive: "false"
```
+## Usage
+
+
+### Standalone mode
+
+This example describes how to use the RabbitMQ source connector to feed data from RabbitMQ and write data to Pulsar topics in the standalone mode.
+
+#### Prerequisites
+
+- There is a RabbitMQ server with some history messages in the queue.
+
+#### Steps
+
+1. Get a Pulsar package and start Pulsar in standalone mode.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/apache-pulsar-@pulsar:version@-bin.tar.gz
+ tar xvfz apache-pulsar-@pulsar:version@-bin.tar.gz
+ cd apache-pulsar-@pulsar:version@
+ bin/pulsar standalone
+ ```
+
+2. Download the [nar package](https://archive.apache.org/dist/pulsar/) corresponding to Pulsar's version and copy the following file to Pulsar's directory.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/connectors/pulsar-io-rabbitmq-@pulsar:version@.nar
+ cp pulsar-io-rabbitmq-@pulsar:version@.nar ./connectors
+ ```
+
+3. Messages published to a topic lacking at least one durable subscription are automatically marked as ready for deletion by default. We can set a retention policy at the namespace level to prevent this.
+
+ ```bash
+ ./bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
+ ```
+
+
+4. Prepare a configuration file with name is _rabbitmq-source-queue-name.yaml_.
+ ```yaml
+ configs:
+ host: "localhost"
+ port: 5672
+ virtualHost: "/"
+ username: "guest"
+ password: "guest"
+ queueName: "test-queue"
+ connectionName: "test-connection"
+ requestedChannelMax: 0
+ requestedFrameMax: 0
+ connectionTimeout: 60000
+ handshakeTimeout: 10000
+ requestedHeartbeat: 60
+ prefetchCount: 0
+ prefetchGlobal: "false"
+ passive: "false"
+ ```
+
+ Copy the configuration file to Pulsar‘s conf directory.
+ ```bash
+ cp rabbitmq-source-queue-name.yaml ./conf
+ ```
+
+5. Open a new terminal window and start the connector in local run mode.
+
+ ```bash
+ ./bin/pulsar-admin source localrun \
+ --source-config-file conf/rabbitmq-source-queue-name.yaml \
+ --archive connectors/pulsar-io-rabbitmq-@pulsar:version@.nar \
+ --name rabbitmq-source \
+ --destination-topic-name pulsar-rabbitmq-test-topic \
+ --broker-service-url pulsar://{ip}:{port}
+ ```
+
+6. Open a new terminal window and check the topic is created automatically.
+
+ ```bash
+ ./bin/pulsar-admin topics list public/default \
+ ```
+
+ This topic is created automatically as follows:
+
+ ```bash
+ persistent://public/default/pulsar-rabbitmq-test-topic-partition-0
+ ```
+
+7. Consume this topic.
+
+ ```bash
+ ./bin/pulsar-client consume persistent://public/default/pulsar-rabbitmq-test-topic-partition-0 -s s1 -n 0 -p Earliest
+ ```
+
+ The following information appears on the consumer terminal window.
+
+ ```bash
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 0
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 1
+
+ ... ...
+
+ ```
diff --git a/versioned_docs/version-2.8.x/io-rabbitmq-source.md b/versioned_docs/version-2.8.x/io-rabbitmq-source.md
index 37f0718e4e18..d26e4c71f456 100644
--- a/versioned_docs/version-2.8.x/io-rabbitmq-source.md
+++ b/versioned_docs/version-2.8.x/io-rabbitmq-source.md
@@ -83,3 +83,104 @@ Before using the RabbitMQ source connector, you need to create a configuration f
```
+## Usage
+
+
+### Standalone mode
+
+This example describes how to use the RabbitMQ source connector to feed data from RabbitMQ and write data to Pulsar topics in the standalone mode.
+
+#### Prerequisites
+
+- There is a RabbitMQ server with some history messages in the queue.
+
+#### Steps
+
+1. Get a Pulsar package and start Pulsar in standalone mode.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/apache-pulsar-@pulsar:version@-bin.tar.gz
+ tar xvfz apache-pulsar-@pulsar:version@-bin.tar.gz
+ cd apache-pulsar-@pulsar:version@
+ bin/pulsar standalone
+ ```
+
+2. Download the [nar package](https://archive.apache.org/dist/pulsar/) corresponding to Pulsar's version and copy the following file to Pulsar's directory.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/connectors/pulsar-io-rabbitmq-@pulsar:version@.nar
+ cp pulsar-io-rabbitmq-@pulsar:version@.nar ./connectors
+ ```
+
+3. Messages published to a topic lacking at least one durable subscription are automatically marked as ready for deletion by default. We can set a retention policy at the namespace level to prevent this.
+
+ ```bash
+ ./bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
+ ```
+
+
+4. Prepare a configuration file with name is _rabbitmq-source-queue-name.yaml_.
+ ```yaml
+ configs:
+ host: "localhost"
+ port: 5672
+ virtualHost: "/"
+ username: "guest"
+ password: "guest"
+ queueName: "test-queue"
+ connectionName: "test-connection"
+ requestedChannelMax: 0
+ requestedFrameMax: 0
+ connectionTimeout: 60000
+ handshakeTimeout: 10000
+ requestedHeartbeat: 60
+ prefetchCount: 0
+ prefetchGlobal: "false"
+ passive: "false"
+ ```
+
+ Copy the configuration file to Pulsar‘s conf directory.
+ ```bash
+ cp rabbitmq-source-queue-name.yaml ./conf
+ ```
+
+5. Open a new terminal window and start the connector in local run mode.
+
+ ```bash
+ ./bin/pulsar-admin source localrun \
+ --source-config-file conf/rabbitmq-source-queue-name.yaml \
+ --archive connectors/pulsar-io-rabbitmq-@pulsar:version@.nar \
+ --name rabbitmq-source \
+ --destination-topic-name pulsar-rabbitmq-test-topic \
+ --broker-service-url pulsar://{ip}:{port}
+ ```
+
+6. Open a new terminal window and check the topic is created automatically.
+
+ ```bash
+ ./bin/pulsar-admin topics list public/default \
+ ```
+
+ This topic is created automatically as follows:
+
+ ```bash
+ persistent://public/default/pulsar-rabbitmq-test-topic-partition-0
+ ```
+
+7. Consume this topic.
+
+ ```bash
+ ./bin/pulsar-client consume persistent://public/default/pulsar-rabbitmq-test-topic-partition-0 -s s1 -n 0 -p Earliest
+ ```
+
+ The following information appears on the consumer terminal window.
+
+ ```bash
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 0
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 1
+
+ ... ...
+
+ ```
diff --git a/versioned_docs/version-2.9.x/io-rabbitmq-source.md b/versioned_docs/version-2.9.x/io-rabbitmq-source.md
index 37f0718e4e18..de28a06feaf9 100644
--- a/versioned_docs/version-2.9.x/io-rabbitmq-source.md
+++ b/versioned_docs/version-2.9.x/io-rabbitmq-source.md
@@ -83,3 +83,104 @@ Before using the RabbitMQ source connector, you need to create a configuration f
```
+## Usage
+
+
+### Standalone mode
+
+This example describes how to use the RabbitMQ source connector to feed data from RabbitMQ and write data to Pulsar topics in the standalone mode.
+
+#### Prerequisites
+
+- There is a RabbitMQ server with some history messages in the queue.
+
+#### Steps
+
+1. Get a Pulsar package and start Pulsar in standalone mode.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/apache-pulsar-@pulsar:version@-bin.tar.gz
+ tar xvfz apache-pulsar-@pulsar:version@-bin.tar.gz
+ cd apache-pulsar-@pulsar:version@
+ bin/pulsar standalone
+ ```
+
+2. Download the [nar package](https://archive.apache.org/dist/pulsar/) corresponding to Pulsar's version and copy the following file to Pulsar's directory.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/connectors/pulsar-io-rabbitmq-@pulsar:version@.nar
+ cp pulsar-io-rabbitmq-@pulsar:version@.nar ./connectors
+ ```
+
+3. Set the retention of the namespace, otherwise the messages into the Pulsar's topic which have not the subscription have been immediately deleted.
+
+ ```bash
+ ./bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
+ ```
+
+
+4. Prepare a configuration file with name is _rabbitmq-source-queue-name.yaml_.
+ ```yaml
+ configs:
+ host: "localhost"
+ port: 5672
+ virtualHost: "/"
+ username: "guest"
+ password: "guest"
+ queueName: "test-queue"
+ connectionName: "test-connection"
+ requestedChannelMax: 0
+ requestedFrameMax: 0
+ connectionTimeout: 60000
+ handshakeTimeout: 10000
+ requestedHeartbeat: 60
+ prefetchCount: 0
+ prefetchGlobal: "false"
+ passive: "false"
+ ```
+
+ Copy the configuration file to Pulsar‘s conf directory.
+ ```bash
+ cp rabbitmq-source-queue-name.yaml ./conf
+ ```
+
+5. Open a new terminal window and start the connector in local run mode.
+
+ ```bash
+ ./bin/pulsar-admin source localrun \
+ --source-config-file conf/rabbitmq-source-queue-name.yaml \
+ --archive connectors/pulsar-io-rabbitmq-@pulsar:version@.nar \
+ --name rabbitmq-source \
+ --destination-topic-name pulsar-rabbitmq-test-topic \
+ --broker-service-url pulsar://{ip}:{port}
+ ```
+
+6. Open a new terminal window and check the topic is created automatically.
+
+ ```bash
+ ./bin/pulsar-admin topics list public/default \
+ ```
+
+ This topic is created automatically as follows:
+
+ ```bash
+ persistent://public/default/pulsar-rabbitmq-test-topic-partition-0
+ ```
+
+7. Consume this topic.
+
+ ```bash
+ ./bin/pulsar-client consume persistent://public/default/pulsar-rabbitmq-test-topic-partition-0 -s s1 -n 0 -p Earliest
+ ```
+
+ The following information appears on the consumer terminal window.
+
+ ```bash
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 0
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 1
+
+ ... ...
+
+ ```
diff --git a/versioned_docs/version-3.0.x/io-rabbitmq-source.md b/versioned_docs/version-3.0.x/io-rabbitmq-source.md
index 65732703b6f5..65845ce309cd 100644
--- a/versioned_docs/version-3.0.x/io-rabbitmq-source.md
+++ b/versioned_docs/version-3.0.x/io-rabbitmq-source.md
@@ -85,3 +85,104 @@ Before using the RabbitMQ source connector, you need to create a configuration f
passive: "false"
```
+## Usage
+
+
+### Standalone mode
+
+This example describes how to use the RabbitMQ source connector to feed data from RabbitMQ and write data to Pulsar topics in the standalone mode.
+
+#### Prerequisites
+
+- There is a RabbitMQ server with some history messages in the queue.
+
+#### Steps
+
+1. Get a Pulsar package and start Pulsar in standalone mode.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/apache-pulsar-@pulsar:version@-bin.tar.gz
+ tar xvfz apache-pulsar-@pulsar:version@-bin.tar.gz
+ cd apache-pulsar-@pulsar:version@
+ bin/pulsar standalone
+ ```
+
+2. Download the [nar package](https://archive.apache.org/dist/pulsar/) corresponding to Pulsar's version and copy the following file to Pulsar's directory.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/connectors/pulsar-io-rabbitmq-@pulsar:version@.nar
+ cp pulsar-io-rabbitmq-@pulsar:version@.nar ./connectors
+ ```
+
+3. Set the retention of the namespace, otherwise the messages into the Pulsar's topic which have not the subscription have been immediately deleted.
+
+ ```bash
+ ./bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
+ ```
+
+
+4. Prepare a configuration file with name is _rabbitmq-source-queue-name.yaml_.
+ ```yaml
+ configs:
+ host: "localhost"
+ port: 5672
+ virtualHost: "/"
+ username: "guest"
+ password: "guest"
+ queueName: "test-queue"
+ connectionName: "test-connection"
+ requestedChannelMax: 0
+ requestedFrameMax: 0
+ connectionTimeout: 60000
+ handshakeTimeout: 10000
+ requestedHeartbeat: 60
+ prefetchCount: 0
+ prefetchGlobal: "false"
+ passive: "false"
+ ```
+
+ Copy the configuration file to Pulsar‘s conf directory.
+ ```bash
+ cp rabbitmq-source-queue-name.yaml ./conf
+ ```
+
+5. Open a new terminal window and start the connector in local run mode.
+
+ ```bash
+ ./bin/pulsar-admin source localrun \
+ --source-config-file conf/rabbitmq-source-queue-name.yaml \
+ --archive connectors/pulsar-io-rabbitmq-@pulsar:version@.nar \
+ --name rabbitmq-source \
+ --destination-topic-name pulsar-rabbitmq-test-topic \
+ --broker-service-url pulsar://{ip}:{port}
+ ```
+
+6. Open a new terminal window and check the topic is created automatically.
+
+ ```bash
+ ./bin/pulsar-admin topics list public/default \
+ ```
+
+ This topic is created automatically as follows:
+
+ ```bash
+ persistent://public/default/pulsar-rabbitmq-test-topic-partition-0
+ ```
+
+7. Consume this topic.
+
+ ```bash
+ ./bin/pulsar-client consume persistent://public/default/pulsar-rabbitmq-test-topic-partition-0 -s s1 -n 0 -p Earliest
+ ```
+
+ The following information appears on the consumer terminal window.
+
+ ```bash
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 0
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 1
+
+ ... ...
+
+ ```
diff --git a/versioned_docs/version-3.1.x/io-rabbitmq-source.md b/versioned_docs/version-3.1.x/io-rabbitmq-source.md
index 65732703b6f5..65845ce309cd 100644
--- a/versioned_docs/version-3.1.x/io-rabbitmq-source.md
+++ b/versioned_docs/version-3.1.x/io-rabbitmq-source.md
@@ -85,3 +85,104 @@ Before using the RabbitMQ source connector, you need to create a configuration f
passive: "false"
```
+## Usage
+
+
+### Standalone mode
+
+This example describes how to use the RabbitMQ source connector to feed data from RabbitMQ and write data to Pulsar topics in the standalone mode.
+
+#### Prerequisites
+
+- There is a RabbitMQ server with some history messages in the queue.
+
+#### Steps
+
+1. Get a Pulsar package and start Pulsar in standalone mode.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/apache-pulsar-@pulsar:version@-bin.tar.gz
+ tar xvfz apache-pulsar-@pulsar:version@-bin.tar.gz
+ cd apache-pulsar-@pulsar:version@
+ bin/pulsar standalone
+ ```
+
+2. Download the [nar package](https://archive.apache.org/dist/pulsar/) corresponding to Pulsar's version and copy the following file to Pulsar's directory.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/connectors/pulsar-io-rabbitmq-@pulsar:version@.nar
+ cp pulsar-io-rabbitmq-@pulsar:version@.nar ./connectors
+ ```
+
+3. Set the retention of the namespace, otherwise the messages into the Pulsar's topic which have not the subscription have been immediately deleted.
+
+ ```bash
+ ./bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
+ ```
+
+
+4. Prepare a configuration file with name is _rabbitmq-source-queue-name.yaml_.
+ ```yaml
+ configs:
+ host: "localhost"
+ port: 5672
+ virtualHost: "/"
+ username: "guest"
+ password: "guest"
+ queueName: "test-queue"
+ connectionName: "test-connection"
+ requestedChannelMax: 0
+ requestedFrameMax: 0
+ connectionTimeout: 60000
+ handshakeTimeout: 10000
+ requestedHeartbeat: 60
+ prefetchCount: 0
+ prefetchGlobal: "false"
+ passive: "false"
+ ```
+
+ Copy the configuration file to Pulsar‘s conf directory.
+ ```bash
+ cp rabbitmq-source-queue-name.yaml ./conf
+ ```
+
+5. Open a new terminal window and start the connector in local run mode.
+
+ ```bash
+ ./bin/pulsar-admin source localrun \
+ --source-config-file conf/rabbitmq-source-queue-name.yaml \
+ --archive connectors/pulsar-io-rabbitmq-@pulsar:version@.nar \
+ --name rabbitmq-source \
+ --destination-topic-name pulsar-rabbitmq-test-topic \
+ --broker-service-url pulsar://{ip}:{port}
+ ```
+
+6. Open a new terminal window and check the topic is created automatically.
+
+ ```bash
+ ./bin/pulsar-admin topics list public/default \
+ ```
+
+ This topic is created automatically as follows:
+
+ ```bash
+ persistent://public/default/pulsar-rabbitmq-test-topic-partition-0
+ ```
+
+7. Consume this topic.
+
+ ```bash
+ ./bin/pulsar-client consume persistent://public/default/pulsar-rabbitmq-test-topic-partition-0 -s s1 -n 0 -p Earliest
+ ```
+
+ The following information appears on the consumer terminal window.
+
+ ```bash
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 0
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 1
+
+ ... ...
+
+ ```
diff --git a/versioned_docs/version-3.2.x/io-rabbitmq-source.md b/versioned_docs/version-3.2.x/io-rabbitmq-source.md
index 65732703b6f5..b926dcee5852 100644
--- a/versioned_docs/version-3.2.x/io-rabbitmq-source.md
+++ b/versioned_docs/version-3.2.x/io-rabbitmq-source.md
@@ -85,3 +85,104 @@ Before using the RabbitMQ source connector, you need to create a configuration f
passive: "false"
```
+## Usage
+
+
+### Standalone mode
+
+This example describes how to use the RabbitMQ source connector to feed data from RabbitMQ and write data to Pulsar topics in the standalone mode.
+
+#### Prerequisites
+
+- There is a RabbitMQ server with some history messages in the queue.
+
+#### Steps
+
+1. Get a Pulsar package and start Pulsar in standalone mode.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/apache-pulsar-@pulsar:version@-bin.tar.gz
+ tar xvfz apache-pulsar-@pulsar:version@-bin.tar.gz
+ cd apache-pulsar-@pulsar:version@
+ bin/pulsar standalone
+ ```
+
+2. Download the [nar package](https://archive.apache.org/dist/pulsar/) corresponding to Pulsar's version and copy the following file to Pulsar's directory.
+
+ ```bash
+ wget https://archive.apache.org/dist/pulsar/pulsar-@pulsar:version@/connectors/pulsar-io-rabbitmq-@pulsar:version@.nar
+ cp pulsar-io-rabbitmq-@pulsar:version@.nar ./connectors
+ ```
+
+3. Messages published to a topic lacking at least one durable subscription are automatically marked as ready for deletion by default. We can set a retention policy at the namespace level to prevent this.
+
+ ```bash
+ ./bin/pulsar-admin namespaces set-retention -s 100M -t 3d public/default
+ ```
+
+
+4. Prepare a configuration file with name is _rabbitmq-source-queue-name.yaml_.
+ ```yaml
+ configs:
+ host: "localhost"
+ port: 5672
+ virtualHost: "/"
+ username: "guest"
+ password: "guest"
+ queueName: "test-queue"
+ connectionName: "test-connection"
+ requestedChannelMax: 0
+ requestedFrameMax: 0
+ connectionTimeout: 60000
+ handshakeTimeout: 10000
+ requestedHeartbeat: 60
+ prefetchCount: 0
+ prefetchGlobal: "false"
+ passive: "false"
+ ```
+
+ Copy the configuration file to Pulsar‘s conf directory.
+ ```bash
+ cp rabbitmq-source-queue-name.yaml ./conf
+ ```
+
+5. Open a new terminal window and start the connector in local run mode.
+
+ ```bash
+ ./bin/pulsar-admin source localrun \
+ --source-config-file conf/rabbitmq-source-queue-name.yaml \
+ --archive connectors/pulsar-io-rabbitmq-@pulsar:version@.nar \
+ --name rabbitmq-source \
+ --destination-topic-name pulsar-rabbitmq-test-topic \
+ --broker-service-url pulsar://{ip}:{port}
+ ```
+
+6. Open a new terminal window and check the topic is created automatically.
+
+ ```bash
+ ./bin/pulsar-admin topics list public/default \
+ ```
+
+ This topic is created automatically as follows:
+
+ ```bash
+ persistent://public/default/pulsar-rabbitmq-test-topic-partition-0
+ ```
+
+7. Consume this topic.
+
+ ```bash
+ ./bin/pulsar-client consume persistent://public/default/pulsar-rabbitmq-test-topic-partition-0 -s s1 -n 0 -p Earliest
+ ```
+
+ The following information appears on the consumer terminal window.
+
+ ```bash
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 0
+ ----- got message -----
+ key:[quick.orange.pulsar], properties:[], content:message-topic-O(range) 1
+
+ ... ...
+
+ ```