Skip to content

Commit 9626cbd

Browse files
committed
[ISSUE apache#9320] add instructions for CHECK_IMMUNITY_TIME_IN_SECONDS property
1 parent 43a2095 commit 9626cbd

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/cn/RocketMQ_Example.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -783,9 +783,10 @@ public class TransactionListenerImpl implements TransactionListener {
783783
1. 事务消息不支持延时消息和批量消息。
784784
2. 为了避免单个消息被检查太多次而导致半队列消息累积,我们默认将单个消息的检查次数限制为 15 次,但是用户可以通过 Broker 配置文件的 `transactionCheckMax`参数来修改此限制。如果已经检查某条消息超过 N 次的话( N = `transactionCheckMax` ) 则 Broker 将丢弃此消息,并在默认情况下同时打印错误日志。用户可以通过重写 `AbstractTransactionalMessageCheckListener` 类来修改这个行为。
785785
3. 事务消息将在 Broker 配置文件中的参数 transactionTimeout 这样的特定时间长度之后被检查。当发送事务消息时,用户还可以通过设置用户属性 CHECK_IMMUNITY_TIME_IN_SECONDS 来改变这个限制,该参数优先于 `transactionTimeout` 参数。
786-
4. 事务性消息可能不止一次被检查或消费。
787-
5. 提交给用户的目标主题消息可能会失败,目前这依日志的记录而定。它的高可用性通过 RocketMQ 本身的高可用性机制来保证,如果希望确保事务消息不丢失、并且事务完整性得到保证,建议使用同步的双重写入机制。
788-
6. 事务消息的生产者 GroupName 不能与其他类型消息的生产者 GroupName 共享。与其他类型的消息不同,事务消息允许反向查询、MQ服务器能通过它们的生产者 GroupName 查询到生产者。
786+
4. 事务消息属性 CHECK_IMMUNITY_TIME_IN_SECONDS 的含义是回查免疫时间,在此时间长度内,消息不会被回查,取值范围[0, transactionCheckInterval * transactionCheckMax / 1000],超出最大值会导致消息永远得不到回查。
787+
5. 事务性消息可能不止一次被检查或消费。
788+
6. 提交给用户的目标主题消息可能会失败,目前这依日志的记录而定。它的高可用性通过 RocketMQ 本身的高可用性机制来保证,如果希望确保事务消息不丢失、并且事务完整性得到保证,建议使用同步的双重写入机制。
789+
7. 事务消息的生产者 GroupName 不能与其他类型消息的生产者 GroupName 共享。与其他类型的消息不同,事务消息允许反向查询、MQ服务器能通过它们的生产者 GroupName 查询到生产者。
789790

790791
7 Logappender样例
791792
-----------------

docs/en/Example_Transaction.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ public class TransactionListenerImpl implements TransactionListener {
9090
1. Messages of the transactional have no schedule and batch support.
9191
2. In order to avoid a single message being checked too many times and lead to half queue message accumulation, we limited the number of checks for a single message to 15 times by default, but users can change this limit by change the ```transactionCheckMax``` parameter in the configuration of the broker, if one message has been checked over ```transactionCheckMax``` times, broker will discard this message and print an error log at the same time by default. Users can change this behavior by override the ```AbstractTransactionalMessageCheckListener``` class.
9292
3. A transactional message will be checked after a certain period of time that determined by parameter ```transactionTimeout``` in the configuration of the broker. And users also can change this limit by set user property ```CHECK_IMMUNITY_TIME_IN_SECONDS``` when sending transactional message, this parameter takes precedence over the ```transactionTimeout``` parameter.
93-
4. A transactional message maybe checked or consumed more than once.
94-
5. Committed message reput to the user’s target topic may fail. Currently, it depends on the log record. High availability is ensured by the high availability mechanism of RocketMQ itself. If you want to ensure that the transactional message isn’t lost and the transaction integrity is guaranteed, it is recommended to use synchronous double write mechanism.
95-
6. `producerGroup` for producers of transactional messages cannot be shared with `producerGroup` for producers of other types of messages. Unlike other types of message, transactional messages allow backward queries. MQ Server query clients by their `producerGroup` of producers.
93+
4. Transactional message's property CHECK_IMMUNITY_TIME_IN_SECONDS means the immunity time of being checked, within the time range, a message will not be checked. Its value range is [0, transactionCheckInterval * transactionCheckMax / 1000]. Once the value exceeds the maximum value, a message will never be checked.
94+
5. A transactional message maybe checked or consumed more than once.
95+
6. Committed message reput to the user’s target topic may fail. Currently, it depends on the log record. High availability is ensured by the high availability mechanism of RocketMQ itself. If you want to ensure that the transactional message isn’t lost and the transaction integrity is guaranteed, it is recommended to use synchronous double write mechanism.
96+
7. `producerGroup` for producers of transactional messages cannot be shared with `producerGroup` for producers of other types of messages. Unlike other types of message, transactional messages allow backward queries. MQ Server query clients by their `producerGroup` of producers.
9697

0 commit comments

Comments
 (0)