You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2022/11/14 09:11:46 UTC

[rocketmq] branch develop updated: [ISSUE #5506] Add create topic in docs (#5522)

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

lizhanhui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new f55e6bace [ISSUE #5506] Add create topic in docs (#5522)
f55e6bace is described below

commit f55e6bace3a13aa661496c5318cbf8dcf266bc90
Author: Zhouxiang Zhan <zh...@alibaba-inc.com>
AuthorDate: Mon Nov 14 17:11:39 2022 +0800

    [ISSUE #5506] Add create topic in docs (#5522)
---
 docs/cn/Example_CreateTopic.md | 26 ++++++++++++++++++++++++++
 docs/en/Example_CreateTopic.md | 26 ++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/docs/cn/Example_CreateTopic.md b/docs/cn/Example_CreateTopic.md
new file mode 100644
index 000000000..ee975290e
--- /dev/null
+++ b/docs/cn/Example_CreateTopic.md
@@ -0,0 +1,26 @@
+# 创建主题
+
+## 背景
+
+RocketMQ 5.0 引入了 `TopicMessageType` 的概念,并且使用了现有的主题属性功能来实现它。
+
+主题的创建是通过 `mqadmin` 工具来申明 `message.type` 属性。
+
+## 使用案例
+
+```shell
+# default
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster
+
+# normal topic
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster -a +message.type=NORMAL
+
+# fifo topic
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster -a +message.type=FIFO
+
+# delay topic
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster -a +message.type=DELAY
+
+# transaction topic
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster -a +message.type=TRANSACTION
+```
diff --git a/docs/en/Example_CreateTopic.md b/docs/en/Example_CreateTopic.md
new file mode 100644
index 000000000..c3fb5a68c
--- /dev/null
+++ b/docs/en/Example_CreateTopic.md
@@ -0,0 +1,26 @@
+# Create Topic
+
+## Background
+
+The `TopicMessageType` concept is introduced in RocketMQ 5.0, using the existing topic attribute feature to implement it.
+
+The topic is created by `mqadmin` tool declaring the `message.type` attribute.
+
+## User Example
+
+```shell
+# default
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster
+
+# normal topic
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster -a +message.type=NORMAL
+
+# fifo topic
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster -a +message.type=FIFO
+
+# delay topic
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster -a +message.type=DELAY
+
+# transaction topic
+sh ./mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c DefaultCluster -a +message.type=TRANSACTION
+```