Elysia Tools
Navigation
Messaging
RocketMQ: offline synthetic exercises
RocketMQ examples use finite offline models for grouped order, retries and a time boundary.
Samples
Entries inside this sample collection
Per-lane order model
Partition the five synthetic lane/sequence pairs by lane, preserving input order within each list.
{
"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
Bounded retry model
Stop at the first true outcome or after three attempts. Evaluate both finite outcome lists without sleeping or sending.
{
"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
Synthetic clock boundary
With due=5, evaluate readiness at invented times 4, 5 and 6 using now >= due.
{
"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
Tools
Tools frequently paired with this sample
Related
Related sample collections
Related