This is an automated email from the ASF dual-hosted git repository. zhouxzhan pushed a commit to branch new-official-website in repository https://gitbox.apache.org/repos/asf/rocketmq-site.git
The following commit(s) were added to refs/heads/new-official-website by this push: new b0e805f4d6 [ISSUE #640] Add Create subscriptionGroup in fifo message (#641) b0e805f4d6 is described below commit b0e805f4d6e8e8e11edc4a54559cac8794fe89c9 Author: Zhouxiang Zhan <zhouxiang....@alibaba-inc.com> AuthorDate: Fri May 17 17:48:33 2024 +0800 [ISSUE #640] Add Create subscriptionGroup in fifo message (#641) * [ISSUE #640] Add Create subscriptionGroup in fifo message --- .../04-featureBehavior/03fifomessage.md | 25 ++++++++++++++++++---- .../04-featureBehavior/03fifomessage.md | 23 ++++++++++++++++++-- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/03fifomessage.md b/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/03fifomessage.md index ea3035815d..2fbf06dbf5 100644 --- a/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/03fifomessage.md +++ b/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/03fifomessage.md @@ -123,13 +123,19 @@ For creating topics in Apache RocketMQ 5.0, it is recommended to use the mqadmin sh mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c <cluster_name> -a +message.type=FIFO ``` -**Send messages** +**Create subscriptionGroup** -Compared with normal messages, ordered messages must have message groups configured for them. We recommend that you configure message groups at a fine-grained level based on your business requirements to allow for workload decoupling and concurrency scaling. +For creating subscriptionGroup in Apache RocketMQ 5.0, it is recommended to use the mqadmin tool. However, it is worth noting that `-o` option needs to be set to true. Here is an example: -**Create FIFO Topic** +```shell +sh mqadmin updateSubGroup -c <cluster_name> -g <consumer_group_name> -n <nameserver_address> -o true +``` +**Send messages** + +Compared with normal messages, ordered messages must have message groups configured for them. We recommend that you configure message groups at a fine-grained level based on your business requirements to allow for workload decoupling and concurrency scaling. +**Create FIFO topic** ```bash ./bin/mqadmin updateTopic -c DefaultCluster -t FIFOTopic -o true -n 127.0.0.1:9876 -a +message.type=FIFO @@ -138,7 +144,18 @@ Compared with normal messages, ordered messages must have message groups configu + -c the cluster name + -t the topic name + -n the address of the nameserver -+ **-o the flag to create a ordered Topic** ++ **-o the flag to create a ordered topic** + +**Create FIFO subscriptionGroup** + +```bash +./bin/mqadmin updateSubGroup -c DefaultCluster -g FIFOGroup -n 127.0.0.1:9876 -o true +``` + ++ -c the cluster name ++ -g the subscription group name ++ -n the address of the nameserver ++ **-o the flag to create a ordered subscription group** diff --git a/versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md b/versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md index 406519cc08..9259a1cbf0 100644 --- a/versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md +++ b/versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md @@ -131,6 +131,14 @@ Apache RocketMQ 5.0版本下创建主题操作,推荐使用mqadmin工具,需 sh mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c <cluster_name> -a +message.type=FIFO ``` +**创建订阅消费组** + +Apache RocketMQ 5.0版本下创建订阅消费组操作,推荐使用mqadmin工具,需要注意的是,对于订阅消费组顺序类型需要通过 `-o` 选项设置。示例如下: + +```shell +sh mqadmin updateSubGroup -c <cluster_name> -g <consumer_group_name> -n <nameserver_address> -o true +``` + **发送消息** 和普通消息发送相比,顺序消息发送必须要设置消息组。消息组的粒度建议按照业务场景,尽可能细粒度设计,以便实现业务拆分和并发扩展。 @@ -143,8 +151,19 @@ sh mqadmin updateTopic -n <nameserver_address> -t <topic_name> -c <cluster_name> + -c 集群名称 + -t Topic名称 -+ -n nameserver地址 -+ -o 创建顺序消息 ++ -n Nameserver地址 ++ **-o 创建顺序消息主题** + +**创建FIFO订阅消费组** + +```bash +./bin/mqadmin updateSubGroup -c DefaultCluster -g FIFOGroup -n 127.0.0.1:9876 -o true +``` + ++ -c 集群名称 ++ -g ConsumerGroup名称 ++ -n Nameserver地址 ++ **-o 创建顺序订阅消费组**