Elysia Tools
导航
消息
RocketMQ: 离线合成练习
RocketMQ 案例使用离线有限模型说明分组顺序、重试与时间边界。
案例
这个案例集合中的条目
分组顺序模型
按分组划分五个合成组号/序号对,每组保留输入顺序。
{
"scope": "explicitly synthetic, offline only; not product SDK configuration",
"fixtureVersion": 1,
"kind": "lanes",
"input": [
[
0,
0
],
[
1,
0
],
[
0,
1
],
[
1,
1
],
[
0,
2
]
],
"rule": "partition toy pairs by lane, preserve encountered sequence",
"expected": {
"0": [
0,
1,
2
],
"1": [
0,
1
]
}
}- synthetic
- true
- offlineOnly
- true
- sdkIntegration
- false
有界重试模型
遇到首个true或达到三次尝试就停止;计算两份有限结果列表,不等待、不发送。
{
"scope": "explicitly synthetic, offline only; not product SDK configuration",
"fixtureVersion": 1,
"kind": "retry",
"maxAttempts": 3,
"outcomes": [
[
false,
false,
true
],
[
false,
false,
false,
true
]
],
"rule": "stop on first true or at maxAttempts; no sleeping or sending",
"expected": [
{
"attempts": 3,
"success": true
},
{
"attempts": 3,
"success": false
}
]
}- synthetic
- true
- offlineOnly
- true
- sdkIntegration
- false
合成时钟边界
due=5时,用now >= due判断虚构时间4、5、6。
{
"scope": "explicitly synthetic, offline only; not product SDK configuration",
"fixtureVersion": 1,
"kind": "clock",
"due": 5,
"times": [
4,
5,
6
],
"rule": "ready iff now >= due; invented integer clock, not broker delay levels",
"expected": [
false,
true,
true
]
}- synthetic
- true
- offlineOnly
- true
- sdkIntegration
- false
工具
经常与该案例搭配使用的工具
相关内容
相关案例集合
相关内容