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

jinrongtong 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 aea3842a1 Add command to create or update Transactional Topic (#545)
aea3842a1 is described below

commit aea3842a137b2d49ad4fa714b574ce29ea398b29
Author: Xia Lei <[email protected]>
AuthorDate: Thu May 25 14:23:29 2023 +0800

    Add command to create or update Transactional Topic (#545)
    
    * add command to create or update Transactional Topic
    
    * enrich create command for many topic types
    
    * enrich create command for many topic types in English version
    
    ---------
    
    Co-authored-by: stonexia <[email protected]>
---
 .../version-5.0/04-featureBehavior/01normalmessage.md    |  1 +
 .../version-5.0/04-featureBehavior/02delaymessage.md     | 13 +++++++++++++
 .../version-5.0/04-featureBehavior/03fifomessage.md      | 16 ++++++++++++++++
 .../04-featureBehavior/04transactionmessage.md           | 15 +++++++++++++--
 .../version-5.0/04-featureBehavior/02delaymessage.md     | 13 +++++++++++++
 .../version-5.0/04-featureBehavior/03fifomessage.md      | 15 +++++++++++++++
 .../04-featureBehavior/04transactionmessage.md           | 15 ++++++++++++++-
 7 files changed, 85 insertions(+), 3 deletions(-)

diff --git 
a/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/01normalmessage.md
 
b/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/01normalmessage.md
index a249844e2..6bda2177e 100644
--- 
a/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/01normalmessage.md
+++ 
b/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/01normalmessage.md
@@ -56,6 +56,7 @@ sh mqadmin updateTopic -n <nameserver_address> -t 
<topic_name> -c <cluster_name>
 **Send messages**
 
 You can set index keys and filter tags to filter or search for normal 
messages. The following sample code shows how to send and receive normal 
messages in Java:
+
 ```java
 // Send a normal message. 
   MessageBuilder messageBuilder = new MessageBuilder();
diff --git 
a/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/02delaymessage.md
 
b/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/02delaymessage.md
index e7454726d..416f8bd1a 100644
--- 
a/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/02delaymessage.md
+++ 
b/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/02delaymessage.md
@@ -104,6 +104,19 @@ sh mqadmin updateTopic -n <nameserver_address> -t 
<topic_name> -c <cluster_name>
 
 Unlike normal messages, delay messages must have a delivery timestamp 
specified for them.
 
+**Create DELAY Topic**
+
+```bash
+/bin/mqadmin updateTopic -c DefaultCluster -t DelayTopic -n 127.0.0.1:9876 -a 
+message.type=DELAY
+```
+
++ -c the cluster name
++ -t the topic name
++ -n the address of the nameserver
++ **-a extra attributes,we add an `message.type` attribute with value `DELAY` 
to support delivery DELAY message.**
+
+
+
 The following code provides Java examples of delivery and consumption of delay 
messages:
 
 ```java
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 1f3e22e8d..d553abb64 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
@@ -68,6 +68,7 @@ In the preceding figure, messages from MessageGroup 1 and 
MessageGroup 4 are sto
   In scenarios in which the consumption order is critical, we recommend that 
you specify an appropriate number of retries to prevent out-of-order message 
processing.
 
   
+
 **Combination of production order and consumption order**
 
 If you want messages to be processed based on the FIFO principle, the 
production order and the consumption order are required. In most business 
scenarios, a producer may map to multiple consumers, and not all consumers 
require ordered consumption of messages. You can combine the settings of 
production order and consumption order to meet your requirements in different 
business scenarios. For example, you can send ordered messages and use 
non-sequential concurrent consumption to improve th [...]
@@ -126,6 +127,21 @@ sh mqadmin updateTopic -n <nameserver_address> -t 
<topic_name> -c <cluster_name>
 
 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
+```
+
++ -c the cluster name
++ -t the topic name
++ -n the address of the nameserver
++ **-o the flag to create a ordered Topic**
+
+
+
 The following sample code provides an example on how to send and receive 
ordered messages in Java:
 
 ```java
diff --git 
a/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/04transactionmessage.md
 
b/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/04transactionmessage.md
index 4a1ceed02..15813a831 100644
--- 
a/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/04transactionmessage.md
+++ 
b/i18n/en/docusaurus-plugin-content-docs/version-5.0/04-featureBehavior/04transactionmessage.md
@@ -65,7 +65,6 @@ The following figure shows the interaction process of 
transactional messages.![
 
    * If the status of the message received by the broker is Rollback, the 
broker rolls back the transaction and does not deliver the half message to the 
consumer.
    
-
 5. If the network is disconnected or the producer application is restarted and 
the broker does not receive a second ACK or the status of the half message is 
Unknown, the broker waits a period of time and sends a request to a producer in 
the producer cluster to query the status of the half message.
    **Note** For more information about the length of the period and the 
maximum number of queries, see[Parameter 
limits](../01-introduction/03limits.md).
 
@@ -133,6 +132,19 @@ Sending transactional messages is different from sending 
normal messages in the
 
 * When creating a producer, you must set the transaction checker and bind the 
list of topics of messages to be sent. These actions enable the built-in 
transaction checker of the client to restore topics in the event of exceptions.
 
+**Create TRANSACTION Topic**
+
+*NORMAL Topic doesn't support delivery TRANSACTION message, you'll get an 
error if you send a TRANSACTION message to a NORMAL topic.*
+
+```bash
+./bin/mqadmin updatetopic -n localhost:9876 -t TestTopic -c DefaultCluster -a 
+message.type=TRANSACTION
+```
+
++ -c the cluster name
++ -t the topic name
++ -n the address of the nameserver
++ **-a extra attributes,we add an `message.type` attribute with value 
`TRANSACTION` to support delivery TRANSACTION message.**
+
 The following example uses Java as an example to show you how to send 
transactional messages:
 
 ```java
@@ -234,4 +246,3 @@ Generally, the reason why the transaction is in progress is 
that the transaction
 
 
 
-
diff --git a/versioned_docs/version-5.0/04-featureBehavior/02delaymessage.md 
b/versioned_docs/version-5.0/04-featureBehavior/02delaymessage.md
index d3f6951a3..600f02163 100644
--- a/versioned_docs/version-5.0/04-featureBehavior/02delaymessage.md
+++ b/versioned_docs/version-5.0/04-featureBehavior/02delaymessage.md
@@ -95,6 +95,19 @@ sh mqadmin updateTopic -n <nameserver_address> -t 
<topic_name> -c <cluster_name>
 
 和普通消息相比,定时消费发送时,必须设置定时触发的目标时间戳。
 
+**创建延迟主题**
+
+```bash
+/bin/mqadmin updateTopic -c DefaultCluster -t DelayTopic -n 127.0.0.1:9876 -a 
+message.type=DELAY
+```
+
++ -c 集群名称
++ -t Topic名称
++ -n nameserver地址
++ -a 额外属性,本例给主题添加了`message.type`为`DELAY`的属性用来支持延迟消息
+
+
+
 以Java语言为例,使用定时消息示例参考如下:
 
 ```java
diff --git a/versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md 
b/versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md
index 8b08ac552..dd1adaec1 100644
--- a/versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md
+++ b/versioned_docs/version-5.0/04-featureBehavior/03fifomessage.md
@@ -48,6 +48,7 @@ Apache RocketMQ 的消息的顺序性分为两部分,生产顺序性和消费
   
   * 不同消息组的消息可以混合在同一个队列中,且不保证连续。
   
+
 ![顺序存储逻辑](../picture/v5/fifomessagegroup.png)
 
 
@@ -77,6 +78,7 @@ Apache RocketMQ 的消息的顺序性分为两部分,生产顺序性和消费
     
   
   
+
 **生产顺序性和消费顺序性组合**
 
 如果消息需要严格按照先进先出(FIFO)的原则处理,即先发送的先消费、后发送的后消费,则必须要同时满足生产顺序性和消费顺序性。
@@ -133,6 +135,19 @@ sh mqadmin updateTopic -n <nameserver_address> -t 
<topic_name> -c <cluster_name>
 
 和普通消息发送相比,顺序消息发送必须要设置消息组。消息组的粒度建议按照业务场景,尽可能细粒度设计,以便实现业务拆分和并发扩展。
 
+**创建FIFO主题**
+
+```bash
+./bin/mqadmin updateTopic -c DefaultCluster -t FIFOTopic -o true -n 
127.0.0.1:9876
+```
+
++ -c 集群名称
++ -t Topic名称
++ -n nameserver地址
++ -o 创建顺序消息
+
+
+
 以Java语言为例,收发顺序消息的示例代码如下:
 
 ```java
diff --git 
a/versioned_docs/version-5.0/04-featureBehavior/04transactionmessage.md 
b/versioned_docs/version-5.0/04-featureBehavior/04transactionmessage.md
index 215c367b7..c7a2a754b 100644
--- a/versioned_docs/version-5.0/04-featureBehavior/04transactionmessage.md
+++ b/versioned_docs/version-5.0/04-featureBehavior/04transactionmessage.md
@@ -128,6 +128,20 @@ sh mqadmin updateTopic -n <nameserver_address> -t 
<topic_name> -c <cluster_name>
 
 * 为保证事务一致性,在构建生产者时,必须设置事务检查器和预绑定事务消息发送的主题列表,客户端内置的事务检查器会对绑定的事务主题做异常状态恢复。
 
+**创建事务主题**
+
+*NORMAL类型Topic不支持TRANSACTION类型消息,生产消息会报错。*
+
+```bash
+./bin/mqadmin updatetopic -n localhost:9876 -t TestTopic -c DefaultCluster -a 
+message.type=TRANSACTION
+```
+
++ -c 集群名称
++ -t Topic名称
++ -n nameserver地址
++ -a 额外属性,本例给主题添加了`message.type`为`TRANSACTION`的属性用来支持事务消息
+
+
 
 以Java语言为例,使用事务消息示例参考如下:
 
@@ -227,4 +241,3 @@ Apache RocketMQ支持在事务提交阶段异常的情况下发起事务回查
 
 
 
-

Reply via email to