Skip to content

Commit

Permalink
[ISSUE #640] Add Create subscriptionGroup in fifo message (#641)
Browse files Browse the repository at this point in the history
* [ISSUE #640] Add Create subscriptionGroup in fifo message
  • Loading branch information
drpmma authored May 17, 2024
1 parent 2e875f6 commit b0e805f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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**



Expand Down
23 changes: 21 additions & 2 deletions versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

**发送消息**

和普通消息发送相比,顺序消息发送必须要设置消息组。消息组的粒度建议按照业务场景,尽可能细粒度设计,以便实现业务拆分和并发扩展。
Expand All @@ -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 创建顺序订阅消费组**



Expand Down

0 comments on commit b0e805f

Please sign in to comment.