@radicaltools/cli 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/README.md +237 -22
  2. package/dist/hub-catalogue/concern/concern-api-evolution.radical +935 -0
  3. package/dist/hub-catalogue/concern/concern-architecture-style.radical +1112 -0
  4. package/dist/hub-catalogue/concern/concern-authentication.radical +685 -0
  5. package/dist/hub-catalogue/concern/concern-authorization.radical +1464 -0
  6. package/dist/hub-catalogue/concern/concern-availability.radical +804 -0
  7. package/dist/hub-catalogue/concern/concern-backend-stack.radical +1118 -0
  8. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +1304 -0
  9. package/dist/hub-catalogue/concern/concern-capacity.radical +802 -0
  10. package/dist/hub-catalogue/concern/concern-communication-style.radical +1202 -0
  11. package/dist/hub-catalogue/concern/concern-data-consistency.radical +1081 -0
  12. package/dist/hub-catalogue/concern/concern-data-store.radical +960 -0
  13. package/dist/hub-catalogue/concern/concern-decomposition.radical +1143 -0
  14. package/dist/hub-catalogue/concern/concern-deployment.radical +952 -0
  15. package/dist/hub-catalogue/concern/concern-encryption.radical +1055 -0
  16. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +1340 -0
  17. package/dist/hub-catalogue/concern/concern-infrastructure.radical +1151 -0
  18. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +1079 -0
  19. package/dist/hub-catalogue/concern/concern-messaging.radical +940 -0
  20. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +864 -0
  21. package/dist/hub-catalogue/concern/concern-observability.radical +1048 -0
  22. package/dist/hub-catalogue/concern/concern-personal-data.radical +1434 -0
  23. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +1153 -0
  24. package/dist/hub-catalogue/concern/concern-secrets.radical +1026 -0
  25. package/dist/hub-catalogue/concern/concern-supply-chain.radical +1312 -0
  26. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +1306 -0
  27. package/dist/hub-catalogue/concern/concern-test-strategy.radical +1193 -0
  28. package/dist/index.js +9204 -5242
  29. package/package.json +5 -3
@@ -0,0 +1,940 @@
1
+ {
2
+ "hub": {
3
+ "id": "concern-messaging",
4
+ "category": "concern",
5
+ "name": "Messaging",
6
+ "description": "Messages through queues and topics: how often each is delivered, whether order matters, which broker carries them, how their schemas change, what happens to one that cannot be handled, and how a message and its change stay together.",
7
+ "tags": [
8
+ "messaging",
9
+ "queues",
10
+ "events",
11
+ "kafka",
12
+ "rabbitmq",
13
+ "sqs",
14
+ "idempotency",
15
+ "outbox",
16
+ "dead-letter",
17
+ "schema-registry"
18
+ ],
19
+ "requiredMetamodel": "c4-ddd-governance-builtin",
20
+ "concern": {
21
+ "id": "messaging",
22
+ "trigger": "LIST NODES WHERE type = \"queue\" AND external != true",
23
+ "why": "messages pass through these queues, so how often each is delivered, in what order, and what happens to one that cannot be handled has to be decided.",
24
+ "group": "integration"
25
+ },
26
+ "sources": [
27
+ {
28
+ "title": "Enterprise Integration Patterns, Dead Letter Channel",
29
+ "url": "https://www.enterpriseintegrationpatterns.com/patterns/messaging/DeadLetterChannel.html"
30
+ },
31
+ {
32
+ "title": "microservices.io, Transactional outbox",
33
+ "url": "https://microservices.io/patterns/data/transactional-outbox.html"
34
+ },
35
+ {
36
+ "title": "microservices.io, Idempotent Consumer",
37
+ "url": "https://microservices.io/patterns/communication-style/idempotent-consumer.html"
38
+ },
39
+ {
40
+ "title": "AsyncAPI Specification",
41
+ "url": "https://www.asyncapi.com/docs/reference/specification/latest"
42
+ },
43
+ {
44
+ "title": "CloudEvents specification",
45
+ "url": "https://cloudevents.io/"
46
+ },
47
+ {
48
+ "title": "Confluent, Schema Evolution and Compatibility",
49
+ "url": "https://docs.confluent.io/platform/current/schema-registry/fundamentals/schema-evolution.html"
50
+ }
51
+ ],
52
+ "templateParams": [
53
+ {
54
+ "key": "DELIVERY",
55
+ "title": "Delivery",
56
+ "label": "How often may a message be delivered?",
57
+ "hint": "Exactly once does not exist across a network: either a message may come twice, or it may be lost. This decides which.",
58
+ "defaultValue": "least",
59
+ "options": [
60
+ {
61
+ "value": "least",
62
+ "label": "at least once",
63
+ "description": "Nothing is lost: the broker redelivers until a consumer acknowledges, so a message may arrive twice and every consumer must recognise one it has handled; producers send through an outbox. Pick it whenever a message changes a record: orders, payments, stock."
64
+ },
65
+ {
66
+ "value": "most",
67
+ "label": "at most once",
68
+ "description": "A message is never redelivered, so a crash can lose one; consumers stay simple. Pick it only for messages whose loss changes no record: notifications soon superseded, metrics, cache invalidations with an expiry behind them."
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "key": "ORDER",
74
+ "title": "Order",
75
+ "label": "Does the order of messages matter?",
76
+ "hint": "Order across all messages does not scale; order per key (per order, per account) is usually what is needed, and costs parallelism within a key.",
77
+ "defaultValue": "key",
78
+ "options": [
79
+ {
80
+ "value": "key",
81
+ "label": "in order per key",
82
+ "description": "Messages with the same key (an order id, an account id) are handled one at a time in the order sent; different keys in parallel. Pick it when a later message depends on an earlier one: created, paid, shipped."
83
+ },
84
+ {
85
+ "value": "none",
86
+ "label": "in any order",
87
+ "description": "Consumers run in parallel freely; each message carries a version so a stale one is recognised and ignored. Pick it when messages are independent of each other or carry the whole state of what they describe."
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "key": "BROKER",
93
+ "title": "Broker",
94
+ "label": "Which broker carries the messages?",
95
+ "hint": "A log keeps messages to be read again; a queue hands each to one consumer and forgets it. Choose by fan-out, replay, volume and who runs it.",
96
+ "defaultValue": "kafka",
97
+ "options": [
98
+ {
99
+ "value": "kafka",
100
+ "label": "Apache Kafka",
101
+ "description": "A replicated log: messages are kept for days and can be replayed, order holds per partition, throughput reaches hundreds of thousands a second. Pick it for event streams read by several consumers, replay or rebuilding read models, or very high volume; run as Confluent Cloud, Amazon MSK, Aiven or Strimzi."
102
+ },
103
+ {
104
+ "value": "rabbitmq",
105
+ "label": "RabbitMQ",
106
+ "description": "Queues with flexible routing through exchanges, acknowledgement per message and built-in dead-lettering; quorum queues replicate. Pick it for commands and work queues between services, routing by type or header, and moderate volume (thousands a second); run yourself or as CloudAMQP or Amazon MQ."
107
+ },
108
+ {
109
+ "value": "sqs",
110
+ "label": "Amazon SQS",
111
+ "description": "A managed queue with nothing to operate: redrive to a dead-letter queue built in, FIFO queues for order per message group, SNS in front for fan-out. Pick it on AWS when each queue has one consuming service and replay is not needed."
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ "key": "SCHEMA",
117
+ "title": "Schemas",
118
+ "label": "How do message schemas change safely?",
119
+ "hint": "Producers and consumers are released apart, and old messages wait in the queue while new code reads them: each schema change has to be readable both ways.",
120
+ "defaultValue": "registry",
121
+ "options": [
122
+ {
123
+ "value": "registry",
124
+ "label": "a schema registry",
125
+ "description": "Schemas (Avro, Protobuf or JSON Schema) are registered with a compatibility mode, and the registry refuses an incompatible version when a producer registers it: Confluent Schema Registry or Apicurio for Kafka, AWS Glue Schema Registry on AWS. Pick it when several teams produce or consume the same messages, or messages are kept and replayed long after they were written."
126
+ },
127
+ {
128
+ "value": "repo",
129
+ "label": "schemas in the repository",
130
+ "description": "Messages are described in an AsyncAPI document with JSON Schema in the producer's repository, and CI refuses a breaking change. Pick it when one team owns the producer and its few consumers, or the broker has no registry."
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "key": "MAX_ATTEMPTS",
136
+ "label": "After how many failed attempts is a message set aside?",
137
+ "defaultValue": "5",
138
+ "type": "number"
139
+ },
140
+ {
141
+ "key": "DLQ_HOURS",
142
+ "label": "Within how many hours must a set-aside message be replayed or discarded?",
143
+ "defaultValue": "24",
144
+ "type": "number"
145
+ },
146
+ {
147
+ "key": "LAG_MINUTES",
148
+ "label": "How old may the oldest waiting message get before someone is alerted (minutes)?",
149
+ "defaultValue": "5",
150
+ "type": "number"
151
+ },
152
+ {
153
+ "key": "DEDUPE_DAYS",
154
+ "label": "For how many days does a consumer remember the messages it has handled?",
155
+ "defaultValue": "7",
156
+ "type": "number"
157
+ }
158
+ ]
159
+ },
160
+ "nodes": [
161
+ {
162
+ "id": "need",
163
+ "type": "need",
164
+ "label": "Messages arrive and count once",
165
+ "x": 0,
166
+ "y": 0,
167
+ "kind": "brief",
168
+ "source": "Hub concern pack: Messaging",
169
+ "description": "Parts of the system talk through queues. A message can be delivered twice, lost, arrive out of order, or fail every time it is handled; the change it reports can commit while the message is never sent; a producer can change a message so that a consumer released last month cannot read it. Each of these quietly corrupts data, and a stuck consumer looks like silence, unless it is decided how each is handled."
170
+ },
171
+ {
172
+ "id": "req-envelope",
173
+ "type": "requirement",
174
+ "label": "Messages identify themselves",
175
+ "x": 260,
176
+ "y": 0,
177
+ "ears_type": "ubiquitous",
178
+ "action": "give every message a unique id, its type, its schema version, its source, the time it was produced and a correlation id, as CloudEvents attributes",
179
+ "rationale": "Deduplication, ordering checks, tracing and replay all need these, and a common envelope means every consumer finds them in the same place (CloudEvents specification)."
180
+ },
181
+ {
182
+ "id": "req-dedupe",
183
+ "type": "requirement",
184
+ "label": "Duplicates handled once",
185
+ "x": 260,
186
+ "y": 130,
187
+ "ears_type": "ubiquitous",
188
+ "action": "handle a message delivered more than once as once, by recording its id in the same transaction as its effect and keeping the ids for {{DEDUPE_DAYS}} days",
189
+ "rationale": "At-least-once delivery means duplicates; recording the id with the effect is what makes the second delivery harmless even after a crash (microservices.io, Idempotent Consumer).",
190
+ "hubWhen": {
191
+ "DELIVERY": [
192
+ "least"
193
+ ]
194
+ }
195
+ },
196
+ {
197
+ "id": "req-outbox",
198
+ "type": "requirement",
199
+ "label": "Message sent with its change",
200
+ "x": 260,
201
+ "y": 260,
202
+ "ears_type": "ubiquitous",
203
+ "action": "write each message to an outbox table in the same database transaction as the change it reports, and relay it to the broker from there, so that neither the change nor the message exists without the other",
204
+ "rationale": "Writing to the database and then to the broker loses one of the two in a crash between; the outbox makes them one write (microservices.io, Transactional outbox).",
205
+ "hubWhen": {
206
+ "DELIVERY": [
207
+ "least"
208
+ ]
209
+ }
210
+ },
211
+ {
212
+ "id": "req-dlq",
213
+ "type": "requirement",
214
+ "label": "Failing messages set aside",
215
+ "x": 260,
216
+ "y": 390,
217
+ "ears_type": "unwanted-behaviour",
218
+ "unwanted_condition": "handling a message fails {{MAX_ATTEMPTS}} times",
219
+ "action": "move it to a dead-letter queue with the error and the number of attempts, go on with the next messages, and alert the consumer's owner, who replays or discards it within {{DLQ_HOURS}} hours",
220
+ "rationale": "One poisoned message must neither block the rest nor vanish (Enterprise Integration Patterns, Dead Letter Channel).",
221
+ "hubWhen": {
222
+ "DELIVERY": [
223
+ "least"
224
+ ]
225
+ }
226
+ },
227
+ {
228
+ "id": "req-lossy",
229
+ "type": "requirement",
230
+ "label": "Only losable messages",
231
+ "x": 260,
232
+ "y": 520,
233
+ "ears_type": "ubiquitous",
234
+ "action": "carry only message types listed as losable, whose loss changes no record, and drop a message whose handling fails without retrying it, counting the drops per type",
235
+ "rationale": "At-most-once delivery loses messages by design; the list keeps a message that matters from being sent through it by accident.",
236
+ "hubWhen": {
237
+ "DELIVERY": [
238
+ "most"
239
+ ]
240
+ }
241
+ },
242
+ {
243
+ "id": "req-order",
244
+ "type": "requirement",
245
+ "label": "Order kept per key",
246
+ "x": 260,
247
+ "y": 650,
248
+ "ears_type": "ubiquitous",
249
+ "action": "publish every message with its key (the order id, the account id), and handle the messages of one key one at a time in the order they were published, while different keys run in parallel",
250
+ "rationale": "Applying \"paid\" before \"created\" breaks the record; order per key keeps it without giving up parallelism across keys (Enterprise Integration Patterns, Resequencer and Message Sequence).",
251
+ "hubWhen": {
252
+ "ORDER": [
253
+ "key"
254
+ ]
255
+ }
256
+ },
257
+ {
258
+ "id": "req-stale",
259
+ "type": "requirement",
260
+ "label": "Stale messages ignored",
261
+ "x": 260,
262
+ "y": 780,
263
+ "ears_type": "unwanted-behaviour",
264
+ "unwanted_condition": "a message arrives carrying a version older than the one the record it changes already holds",
265
+ "action": "ignore it and count it, so that the result does not depend on the order of delivery",
266
+ "rationale": "Without order, a late message would overwrite a newer state; a version on each message makes any order give the same result.",
267
+ "hubWhen": {
268
+ "ORDER": [
269
+ "none"
270
+ ]
271
+ }
272
+ },
273
+ {
274
+ "id": "req-schema-registry",
275
+ "type": "requirement",
276
+ "label": "Incompatible schemas refused",
277
+ "x": 260,
278
+ "y": 910,
279
+ "ears_type": "event-driven",
280
+ "trigger": "a producer registers a new version of a message schema",
281
+ "action": "check it against every earlier version under the subject's compatibility mode (BACKWARD_TRANSITIVE by default, FULL_TRANSITIVE when consumers may upgrade first) and refuse an incompatible one before any message uses it",
282
+ "rationale": "Old messages wait in the queue and are replayed long after; a transitive check keeps every version readable (Confluent, Schema Evolution and Compatibility).",
283
+ "hubWhen": {
284
+ "SCHEMA": [
285
+ "registry"
286
+ ]
287
+ }
288
+ },
289
+ {
290
+ "id": "req-schema-repo",
291
+ "type": "requirement",
292
+ "label": "Breaking schema change refused",
293
+ "x": 260,
294
+ "y": 1040,
295
+ "ears_type": "unwanted-behaviour",
296
+ "unwanted_condition": "a pull request changes a message in the AsyncAPI document so that a consumer of the last release cannot read it (a field removed, renamed or retyped, or a new required field)",
297
+ "action": "fail the build, and accept the change only as a new message type or channel version published beside the old one",
298
+ "rationale": "Producers and consumers are released apart; the document is the contract both build against (AsyncAPI Specification).",
299
+ "hubWhen": {
300
+ "SCHEMA": [
301
+ "repo"
302
+ ]
303
+ }
304
+ },
305
+ {
306
+ "id": "req-lag",
307
+ "type": "requirement",
308
+ "label": "Backlog alerted",
309
+ "x": 260,
310
+ "y": 1170,
311
+ "ears_type": "unwanted-behaviour",
312
+ "unwanted_condition": "the oldest message waiting for a consumer is older than {{LAG_MINUTES}} minutes",
313
+ "action": "alert the owner of that consumer",
314
+ "rationale": "A stopped or slow consumer looks like silence; the age of the oldest message is the one number that shows it (AWS ApproximateAgeOfOldestMessage, consumer lag in Kafka)."
315
+ },
316
+ {
317
+ "id": "sc-envelope",
318
+ "type": "scenario",
319
+ "label": "Envelope complete",
320
+ "x": 520,
321
+ "y": 0,
322
+ "given": "each message type a producer sends",
323
+ "when": "one of each is read from the queue",
324
+ "then": "each carries id, type, schema version, source, time and correlation id, and no two ids are equal"
325
+ },
326
+ {
327
+ "id": "sc-dedupe",
328
+ "type": "scenario",
329
+ "label": "Duplicate ignored",
330
+ "x": 520,
331
+ "y": 130,
332
+ "given": "a consumer that has handled a message",
333
+ "when": "the same message is delivered again, once right away and once after a restart",
334
+ "then": "state is as after one delivery, and the duplicates are counted",
335
+ "hubWhen": {
336
+ "DELIVERY": [
337
+ "least"
338
+ ]
339
+ }
340
+ },
341
+ {
342
+ "id": "sc-outbox",
343
+ "type": "scenario",
344
+ "label": "Crash between write and send",
345
+ "x": 520,
346
+ "y": 260,
347
+ "given": "a change committed with its message in the outbox",
348
+ "when": "the process crashes before the message reaches the broker, and restarts",
349
+ "then": "the message is sent after the restart, and a rolled-back change sends nothing",
350
+ "hubWhen": {
351
+ "DELIVERY": [
352
+ "least"
353
+ ]
354
+ }
355
+ },
356
+ {
357
+ "id": "sc-dlq",
358
+ "type": "scenario",
359
+ "label": "Poison message set aside",
360
+ "x": 520,
361
+ "y": 390,
362
+ "given": "a message its consumer always fails on",
363
+ "when": "it has failed {{MAX_ATTEMPTS}} times",
364
+ "then": "it is in the dead-letter queue with its error, the owner is alerted, and the messages behind it are handled",
365
+ "hubWhen": {
366
+ "DELIVERY": [
367
+ "least"
368
+ ]
369
+ }
370
+ },
371
+ {
372
+ "id": "sc-lossy",
373
+ "type": "scenario",
374
+ "label": "Unlisted type refused",
375
+ "x": 520,
376
+ "y": 520,
377
+ "given": "the list of losable message types",
378
+ "when": "a producer sends a type on the list, a type not on it, and a consumer fails on one message",
379
+ "then": "the first is delivered, the second is refused at the producer, and the failed one is dropped and counted",
380
+ "hubWhen": {
381
+ "DELIVERY": [
382
+ "most"
383
+ ]
384
+ }
385
+ },
386
+ {
387
+ "id": "sc-order",
388
+ "type": "scenario",
389
+ "label": "Order of one key kept",
390
+ "x": 520,
391
+ "y": 650,
392
+ "given": "three messages for one order published in sequence among a thousand for other orders",
393
+ "when": "four consumers handle them in parallel",
394
+ "then": "the three are handled in the order published",
395
+ "hubWhen": {
396
+ "ORDER": [
397
+ "key"
398
+ ]
399
+ }
400
+ },
401
+ {
402
+ "id": "sc-stale",
403
+ "type": "scenario",
404
+ "label": "Late message ignored",
405
+ "x": 520,
406
+ "y": 780,
407
+ "given": "a record at version 3",
408
+ "when": "a message with version 2 for it arrives",
409
+ "then": "the record stays at version 3 and the stale message is counted",
410
+ "hubWhen": {
411
+ "ORDER": [
412
+ "none"
413
+ ]
414
+ }
415
+ },
416
+ {
417
+ "id": "sc-schema-registry",
418
+ "type": "scenario",
419
+ "label": "Removed field refused",
420
+ "x": 520,
421
+ "y": 910,
422
+ "given": "a subject in BACKWARD_TRANSITIVE mode with three versions",
423
+ "when": "a producer registers a version that removes a field without a default",
424
+ "then": "the registry refuses it and the producer's build fails",
425
+ "hubWhen": {
426
+ "SCHEMA": [
427
+ "registry"
428
+ ]
429
+ }
430
+ },
431
+ {
432
+ "id": "sc-schema-repo",
433
+ "type": "scenario",
434
+ "label": "Breaking change fails",
435
+ "x": 520,
436
+ "y": 1040,
437
+ "given": "a pull request that renames a field of a message",
438
+ "when": "the schema check compares it with the last release",
439
+ "then": "the build fails, and passes once the change is a new message version",
440
+ "hubWhen": {
441
+ "SCHEMA": [
442
+ "repo"
443
+ ]
444
+ }
445
+ },
446
+ {
447
+ "id": "sc-lag",
448
+ "type": "scenario",
449
+ "label": "Stuck consumer alerted",
450
+ "x": 520,
451
+ "y": 1170,
452
+ "given": "a consumer that has stopped",
453
+ "when": "messages wait longer than {{LAG_MINUTES}} minutes",
454
+ "then": "its owner is alerted"
455
+ },
456
+ {
457
+ "id": "adr-least",
458
+ "type": "adr",
459
+ "label": "At-least-once delivery with idempotent consumers",
460
+ "x": 780,
461
+ "y": 0,
462
+ "concern": "messaging",
463
+ "status": "accepted",
464
+ "date": "",
465
+ "context": "Parts of the system, or other systems, talk through this queue instead of calling each other. The forces: brokers and networks redeliver, so a message may arrive twice, and avoiding that loses messages instead (exactly once does not exist end to end); a change committed to the database and its message sent to the broker are two writes, and a crash between them keeps one without the other; parallel consumers reorder messages unless order is asked for, and global order does not scale; a message that always fails either blocks the ones behind it or vanishes; producers and consumers are released apart, so a message schema changes while old messages are still waiting; and a backlog grows silently until someone notices that nothing has happened for an hour.",
466
+ "decision": "Messages are delivered at least once. Producers write each message to an outbox table in the transaction of the change it reports, and a relay publishes it (Debezium reading the outbox, or a polling relay of the framework: Spring Modulith, MassTransit, NServiceBus outbox). Every message carries CloudEvents attributes; consumers record each id in the transaction of its effect and keep the ids for {{DEDUPE_DAYS}} days. A message that fails {{MAX_ATTEMPTS}} times, with backoff between attempts, goes to a dead-letter queue and its owner is alerted, to replay or discard it within {{DLQ_HOURS}} hours. Consumers handle messages {{ORDER}}.",
467
+ "consequences": "• No message is lost, and no change is published without its message or the other way round.\n• Every consumer keeps a table of handled ids, written in the same transaction as its effect.\n• The outbox relay is a moving part to run and watch; messages leave a little after the commit.\n• Dead letters need an owner, a tool to replay them and a deadline.",
468
+ "alternatives": "1. At most once: simpler consumers, but messages are lost.\n2. A distributed transaction (XA) across the database and the broker: rarely supported by modern brokers, slow, and couples their availability.\n3. Kafka transactions (exactly-once within Kafka): only for read-process-write that stays inside Kafka; the database still needs the outbox.",
469
+ "hubWhen": {
470
+ "DELIVERY": [
471
+ "least"
472
+ ]
473
+ }
474
+ },
475
+ {
476
+ "id": "adr-most",
477
+ "type": "adr",
478
+ "label": "At-most-once delivery for losable messages",
479
+ "x": 780,
480
+ "y": 130,
481
+ "concern": "messaging",
482
+ "status": "accepted",
483
+ "date": "",
484
+ "context": "Parts of the system, or other systems, talk through this queue instead of calling each other. The forces: brokers and networks redeliver, so a message may arrive twice, and avoiding that loses messages instead (exactly once does not exist end to end); a change committed to the database and its message sent to the broker are two writes, and a crash between them keeps one without the other; parallel consumers reorder messages unless order is asked for, and global order does not scale; a message that always fails either blocks the ones behind it or vanishes; producers and consumers are released apart, so a message schema changes while old messages are still waiting; and a backlog grows silently until someone notices that nothing has happened for an hour. Here the messages are notifications, metrics or hints whose loss changes no record.",
485
+ "decision": "Messages are delivered at most once: acknowledged on receipt (auto-ack, or offsets committed before handling) and never redelivered; a failed message is dropped and counted. Only message types on the losable list, kept in the code, may be published; anything that changes a record needs this decision superseded by at-least-once delivery first. Every message still carries CloudEvents attributes. Consumers handle messages {{ORDER}}.",
486
+ "consequences": "• Simple consumers: no handled-id table, no dead letters, no outbox.\n• A crash or a deployment loses the messages in flight, by design.\n• The losable list is the line to watch: a message that matters must never go through.",
487
+ "alternatives": "1. At least once with idempotent consumers and an outbox, as soon as a message matters.\n2. No messaging: notify by a direct call that may fail visibly.",
488
+ "hubWhen": {
489
+ "DELIVERY": [
490
+ "most"
491
+ ]
492
+ }
493
+ },
494
+ {
495
+ "id": "adr-kafka",
496
+ "type": "adr",
497
+ "label": "Apache Kafka carries the messages",
498
+ "x": 780,
499
+ "y": 260,
500
+ "concern": "messaging",
501
+ "status": "accepted",
502
+ "date": "",
503
+ "context": "Parts of the system, or other systems, talk through this queue instead of calling each other. The forces: brokers and networks redeliver, so a message may arrive twice, and avoiding that loses messages instead (exactly once does not exist end to end); a change committed to the database and its message sent to the broker are two writes, and a crash between them keeps one without the other; parallel consumers reorder messages unless order is asked for, and global order does not scale; a message that always fails either blocks the ones behind it or vanishes; producers and consumers are released apart, so a message schema changes while old messages are still waiting; and a backlog grows silently until someone notices that nothing has happened for an hour.",
504
+ "decision": "Messages go through Apache Kafka (managed: Confluent Cloud, Amazon MSK or Aiven; on Kubernetes: Strimzi). Topics are replicated 3 times with min.insync.replicas = 2; producers use acks = all and enable.idempotence = true; retention is at least 7 days so a consumer can replay. Consumers handle messages {{ORDER}}: the message key (the order id, the account id) is the partition key, so the messages of one key stay in order on one partition; a consumer group's parallelism is its partition count. Kafka has no dead-letter queue of its own: the consumer framework (Spring Kafka DeadLetterPublishingRecoverer, Kafka Connect errors.deadletterqueue) publishes failed messages to a <topic>.dlq topic. Consumer lag is exported to Prometheus and alerted at {{LAG_MINUTES}} minutes. Choose Kafka over a queue broker when several consumers read the same stream, replay is needed, or volume is beyond tens of thousands a second.",
505
+ "consequences": "• Any number of consumers can read a topic, each at its own pace, and replay it.\n• Order is per partition only; the partition count bounds parallelism and is hard to change later.\n• Retries and dead letters are the consumer's code, not the broker's.\n• A cluster is heavy to run yourself; managed Kafka costs per partition and throughput.",
506
+ "alternatives": "1. RabbitMQ: routing and per-message dead-lettering built in, but no replay.\n2. Amazon SQS with SNS: nothing to run, but no replay and fan-out through SNS.\n3. Apache Pulsar or Redpanda: Kafka-like logs with other trade-offs (tiered storage, no JVM).",
507
+ "hubWhen": {
508
+ "BROKER": [
509
+ "kafka"
510
+ ]
511
+ }
512
+ },
513
+ {
514
+ "id": "adr-rabbitmq",
515
+ "type": "adr",
516
+ "label": "RabbitMQ carries the messages",
517
+ "x": 780,
518
+ "y": 390,
519
+ "concern": "messaging",
520
+ "status": "accepted",
521
+ "date": "",
522
+ "context": "Parts of the system, or other systems, talk through this queue instead of calling each other. The forces: brokers and networks redeliver, so a message may arrive twice, and avoiding that loses messages instead (exactly once does not exist end to end); a change committed to the database and its message sent to the broker are two writes, and a crash between them keeps one without the other; parallel consumers reorder messages unless order is asked for, and global order does not scale; a message that always fails either blocks the ones behind it or vanishes; producers and consumers are released apart, so a message schema changes while old messages are still waiting; and a backlog grows silently until someone notices that nothing has happened for an hour.",
523
+ "decision": "Messages go through RabbitMQ (self-run on three nodes, CloudAMQP or Amazon MQ), on quorum queues so that they survive the loss of a node. Publishers use publisher confirms; consumers acknowledge manually after handling, with a prefetch of 10 to 50. A policy on every queue sets a dead-letter exchange and delivery-limit = {{MAX_ATTEMPTS}}, so a message that keeps failing goes to its <queue>.dlq. Consumers handle messages {{ORDER}}; where order per key is needed, the consistent-hash exchange spreads keys over single-active-consumer queues, so one key always lands in one queue read by one consumer. Queue depth, consumers and dead letters are exported through the rabbitmq_prometheus plugin and alerted. Choose RabbitMQ over a log when messages are commands or work items for one consumer each, routing by type matters, and replay is not needed.",
524
+ "consequences": "• Dead-lettering and delivery limits are the broker's, not code.\n• A message is gone once acknowledged: no replay, so read models are rebuilt from the source, not the queue.\n• Order per key costs a queue per hash bucket and one active consumer each.\n• A cluster to run and upgrade, unless bought managed.",
525
+ "alternatives": "1. Apache Kafka: replay and many consumers per stream, but dead letters and routing in code.\n2. Amazon SQS: nothing to run on AWS, less routing.\n3. Azure Service Bus: managed, with sessions for order and dead-lettering built in, on Azure.",
526
+ "hubWhen": {
527
+ "BROKER": [
528
+ "rabbitmq"
529
+ ]
530
+ }
531
+ },
532
+ {
533
+ "id": "adr-sqs",
534
+ "type": "adr",
535
+ "label": "Amazon SQS carries the messages",
536
+ "x": 780,
537
+ "y": 520,
538
+ "concern": "messaging",
539
+ "status": "accepted",
540
+ "date": "",
541
+ "context": "Parts of the system, or other systems, talk through this queue instead of calling each other. The forces: brokers and networks redeliver, so a message may arrive twice, and avoiding that loses messages instead (exactly once does not exist end to end); a change committed to the database and its message sent to the broker are two writes, and a crash between them keeps one without the other; parallel consumers reorder messages unless order is asked for, and global order does not scale; a message that always fails either blocks the ones behind it or vanishes; producers and consumers are released apart, so a message schema changes while old messages are still waiting; and a backlog grows silently until someone notices that nothing has happened for an hour.",
542
+ "decision": "Messages go through Amazon SQS, with SNS in front when more than one service consumes a kind of message. Each queue has a redrive policy to its own dead-letter queue with maxReceiveCount = {{MAX_ATTEMPTS}} and a visibility timeout of six times the consumer's handling time. Consumers handle messages {{ORDER}}; where order per key is needed, FIFO queues take the key as MessageGroupId (in high-throughput mode when one queue needs more than 300 messages a second), otherwise standard queues are used. CloudWatch alarms watch ApproximateAgeOfOldestMessage at {{LAG_MINUTES}} minutes and any message in a dead-letter queue. Queues are defined in Terraform. Choose SQS on AWS when each queue has one consuming service, replay is not needed, and nobody should run a broker.",
543
+ "consequences": "• Nothing to run or patch; cost per request.\n• Standard queues deliver at least once and out of order; FIFO queues keep order per group at a lower throughput.\n• No replay: a message is gone once deleted.\n• Messages are limited to 256 KB; larger payloads go to S3 with a reference.",
544
+ "alternatives": "1. Amazon Kinesis or MSK: replay and many readers per stream on AWS, more to manage.\n2. Amazon EventBridge: routing by content between many services, with lower throughput per rule.\n3. RabbitMQ on Amazon MQ: richer routing, a broker to size.",
545
+ "hubWhen": {
546
+ "BROKER": [
547
+ "sqs"
548
+ ]
549
+ }
550
+ },
551
+ {
552
+ "id": "adr-registry",
553
+ "type": "adr",
554
+ "label": "Message schemas in a schema registry",
555
+ "x": 780,
556
+ "y": 650,
557
+ "concern": "messaging",
558
+ "status": "accepted",
559
+ "date": "",
560
+ "context": "Parts of the system, or other systems, talk through this queue instead of calling each other. The forces: brokers and networks redeliver, so a message may arrive twice, and avoiding that loses messages instead (exactly once does not exist end to end); a change committed to the database and its message sent to the broker are two writes, and a crash between them keeps one without the other; parallel consumers reorder messages unless order is asked for, and global order does not scale; a message that always fails either blocks the ones behind it or vanishes; producers and consumers are released apart, so a message schema changes while old messages are still waiting; and a backlog grows silently until someone notices that nothing has happened for an hour.",
561
+ "decision": "Every message type has a schema (Avro or Protobuf; JSON Schema where consumers cannot use either) registered in a schema registry under one subject per topic or message type: Confluent Schema Registry or Apicurio Registry with Kafka, AWS Glue Schema Registry on AWS. Subjects are set to BACKWARD_TRANSITIVE, FULL_TRANSITIVE where consumers may be upgraded before producers. Producers fail to start with an unregistered schema (auto.register.schemas = false in production); CI asks the registry whether a changed schema is compatible before merge. The schema version travels in the message.",
562
+ "consequences": "• An incompatible schema is refused before any message uses it, across teams.\n• Old messages stay readable for as long as they are kept.\n• The registry is on the producer's path at start-up and must be highly available.\n• Removing a field needs a default first; renaming is add-then-remove.",
563
+ "alternatives": "1. Schemas in the repository with an AsyncAPI diff in CI: no registry to run, but only the producer's repository is checked.\n2. Schemaless JSON: nothing to set up, and breaks are found by consumers in production.",
564
+ "hubWhen": {
565
+ "SCHEMA": [
566
+ "registry"
567
+ ]
568
+ }
569
+ },
570
+ {
571
+ "id": "adr-schema-repo",
572
+ "type": "adr",
573
+ "label": "Message schemas in the repository",
574
+ "x": 780,
575
+ "y": 780,
576
+ "concern": "messaging",
577
+ "status": "accepted",
578
+ "date": "",
579
+ "context": "Parts of the system, or other systems, talk through this queue instead of calling each other. The forces: brokers and networks redeliver, so a message may arrive twice, and avoiding that loses messages instead (exactly once does not exist end to end); a change committed to the database and its message sent to the broker are two writes, and a crash between them keeps one without the other; parallel consumers reorder messages unless order is asked for, and global order does not scale; a message that always fails either blocks the ones behind it or vanishes; producers and consumers are released apart, so a message schema changes while old messages are still waiting; and a backlog grows silently until someone notices that nothing has happened for an hour.",
580
+ "decision": "Every channel and message is described in an AsyncAPI document with JSON Schema payloads, kept in the producer's repository and released with it. CI compares the document with the last release (AsyncAPI CLI diff) and fails on a breaking change; a breaking change becomes a new message version on the same channel, published beside the old one until consumers have moved. Consumers generate their types from the released document. Choose it over a registry when one team owns the producer and its consumers, or the broker has no registry to hand.",
581
+ "consequences": "• No registry to run; the contract is reviewed with the code.\n• Only the producer's pull requests are checked: a consumer that reads a field the document never promised is not protected.\n• Two versions of a message are published side by side while consumers move.",
582
+ "alternatives": "1. A schema registry: checks at publish time across teams, one more service to run.\n2. Schemaless JSON: nothing to set up, breaks found in production.",
583
+ "hubWhen": {
584
+ "SCHEMA": [
585
+ "repo"
586
+ ]
587
+ }
588
+ },
589
+ {
590
+ "id": "ff-dupes",
591
+ "type": "fitness-fn",
592
+ "label": "Duplicate delivery harmless",
593
+ "x": 1040,
594
+ "y": 0,
595
+ "category": "structural",
596
+ "threshold": "Every consumer, given each of its message types twice (and again after a restart), ends in the same state as with one delivery; 0 double effects",
597
+ "description": "An integration test starts the real broker and database in containers, publishes each message type a consumer handles twice with the same id, restarts the consumer, publishes it a third time, and compares the state with a single delivery.\n\nTool: Testcontainers (Kafka, RabbitMQ or LocalStack module) with Vitest\n\n```ts\nimport { runWith } from './harness' // starts broker and database with Testcontainers, runs the real consumer\nimport { MESSAGE_SAMPLES } from '../src/messages/samples' // one sample per message type\n\ndescribe.each(MESSAGE_SAMPLES)('$type', (sample) => {\n it('has the effect of one delivery when delivered three times', async () => {\n const once = await runWith([sample])\n const thrice = await runWith([sample, sample], { restart: true, then: [sample] })\n expect(thrice.state).toEqual(once.state)\n expect(thrice.duplicatesCounted).toBe(2)\n })\n})\n```",
598
+ "hubWhen": {
599
+ "DELIVERY": [
600
+ "least"
601
+ ]
602
+ }
603
+ },
604
+ {
605
+ "id": "ff-outbox",
606
+ "type": "fitness-fn",
607
+ "label": "Only the outbox publishes",
608
+ "x": 1040,
609
+ "y": 130,
610
+ "category": "structural",
611
+ "threshold": "0 modules outside the outbox relay import a broker client",
612
+ "description": "A dependency rule fails the build when code outside the outbox relay imports the broker's client, which would mean a message sent outside the transaction of its change.\n\nTool: dependency-cruiser\n\n```js\n// .dependency-cruiser.cjs\nmodule.exports = {\n forbidden: [{\n name: 'publish-through-outbox',\n comment: 'ADR At-least-once delivery: messages go to the outbox table, only the relay talks to the broker',\n severity: 'error',\n from: { pathNot: '^src/outbox/relay' },\n to: { path: 'node_modules/(kafkajs|@confluentinc/kafka-javascript|amqplib|@aws-sdk/client-sqs|@aws-sdk/client-sns)' },\n }],\n}\n```",
613
+ "hubWhen": {
614
+ "DELIVERY": [
615
+ "least"
616
+ ]
617
+ }
618
+ },
619
+ {
620
+ "id": "ff-lossy",
621
+ "type": "fitness-fn",
622
+ "label": "Only losable types sent",
623
+ "x": 1040,
624
+ "y": 260,
625
+ "category": "structural",
626
+ "threshold": "Every message type a producer can publish is on the losable list; 0 off it",
627
+ "description": "A test enumerates the message types the producers can publish from their type definitions (not from a list kept by hand) and fails on any that is not on the losable list, so a message that matters cannot slip into an at-most-once queue.\n\nTool: Vitest\n\n```ts\nimport { PUBLISHED_TYPES } from '../src/messages' // derived from the producers' type union\nimport { LOSABLE } from '../src/messages/losable' // reviewed list: loss changes no record\n\nit('publishes only message types whose loss changes no record', () => {\n expect(PUBLISHED_TYPES.filter((t) => !LOSABLE.has(t))).toEqual([])\n})\n```",
628
+ "hubWhen": {
629
+ "DELIVERY": [
630
+ "most"
631
+ ]
632
+ }
633
+ },
634
+ {
635
+ "id": "ff-stale",
636
+ "type": "fitness-fn",
637
+ "label": "Any order, same result",
638
+ "x": 1040,
639
+ "y": 390,
640
+ "category": "structural",
641
+ "threshold": "For every message type, all orders of a sequence of 3 versions end in the state of the highest version; 0 differences",
642
+ "description": "A property-based test generates sequences of versioned messages for one record, applies every permutation, and expects the same final state as the ordered sequence.\n\nTool: fast-check with Vitest\n\n```ts\nimport fc from 'fast-check'\nimport { apply, emptyState } from '../src/consumer'\nimport { arbitraryUpdates } from './arbitraries' // versioned messages for one record\n\nit('ends in the same state whatever the order', () => {\n fc.assert(fc.property(\n arbitraryUpdates(3).chain((updates) =>\n fc.tuple(fc.constant(updates), fc.shuffledSubarray(updates, { minLength: updates.length }))),\n ([updates, shuffled]) => {\n const ordered = [...updates].sort((a, b) => a.version - b.version).reduce(apply, emptyState)\n expect(shuffled.reduce(apply, emptyState)).toEqual(ordered)\n }))\n})\n```",
643
+ "hubWhen": {
644
+ "ORDER": [
645
+ "none"
646
+ ]
647
+ }
648
+ },
649
+ {
650
+ "id": "ff-order",
651
+ "type": "fitness-fn",
652
+ "label": "Order per key holds",
653
+ "x": 1040,
654
+ "y": 520,
655
+ "category": "structural",
656
+ "threshold": "With 4 consumers in parallel, the messages of each of 100 keys are handled in the order published; 0 out of order",
657
+ "description": "An integration test against the real broker in a container publishes numbered messages for 100 keys interleaved, runs four consumers, and checks that each key's numbers were handled in increasing order.\n\nTool: Testcontainers (Kafka, RabbitMQ or LocalStack module) with Vitest\n\n```ts\nit('keeps the order within each key', async () => {\n const keys = Array.from({ length: 100 }, (_, i) => 'order-' + i)\n for (let n = 1; n <= 20; n++) for (const key of keys) await publish({ key, n })\n const handled = await consumeWith(4, keys.length * 20) // [{ key, n }] in handling order\n for (const key of keys) {\n const ns = handled.filter((m) => m.key === key).map((m) => m.n)\n expect(ns).toEqual([...ns].sort((a, b) => a - b))\n }\n})\n```",
658
+ "hubWhen": {
659
+ "ORDER": [
660
+ "key"
661
+ ]
662
+ }
663
+ },
664
+ {
665
+ "id": "ff-kafka",
666
+ "type": "fitness-fn",
667
+ "label": "Kafka lag and durability",
668
+ "x": 1040,
669
+ "y": 650,
670
+ "category": "operational",
671
+ "threshold": "An alert fires when a consumer group with waiting messages has made no progress for {{LAG_MINUTES}} minutes, or a dead-letter topic receives a message",
672
+ "description": "Prometheus rules over kafka-exporter metrics alert on a consumer group that has messages waiting but has not moved its offset for {{LAG_MINUTES}} minutes (the oldest waiting message is at least that old) and on any message published to a .dlq topic.\n\nTool: Prometheus alerting rules (kafka-exporter)\n\n```yaml\ngroups:\n- name: messaging\n rules:\n - alert: ConsumerStuck\n expr: kafka_consumergroup_lag_sum > 0\n and delta(kafka_consumergroup_current_offset_sum[{{LAG_MINUTES}}m]) == 0\n labels: { severity: page }\n annotations: { summary: \"{{ $labels.consumergroup }} has not moved for {{LAG_MINUTES}} minutes\" }\n - alert: DeadLetters\n expr: increase(kafka_topic_partition_current_offset{topic=~\".+\\\\.dlq\"}[5m]) > 0\n labels: { severity: ticket }\n```",
673
+ "hubWhen": {
674
+ "BROKER": [
675
+ "kafka"
676
+ ]
677
+ }
678
+ },
679
+ {
680
+ "id": "ff-rabbitmq",
681
+ "type": "fitness-fn",
682
+ "label": "RabbitMQ backlog and dead letters",
683
+ "x": 1040,
684
+ "y": 780,
685
+ "category": "operational",
686
+ "threshold": "An alert fires when a queue has messages ready and no consumer, or messages ready that have not decreased for {{LAG_MINUTES}} minutes, or any message in a .dlq queue; every queue is a quorum queue with delivery-limit = {{MAX_ATTEMPTS}}",
687
+ "description": "Prometheus rules over the rabbitmq_prometheus plugin's per-object metrics alert on stuck queues and dead letters; the policy that sets the dead-letter exchange and delivery limit is applied from the repository.\n\nTool: Prometheus alerting rules (rabbitmq_prometheus plugin, per-object metrics)\n\n```yaml\n# policy, applied from the repository:\n# rabbitmqctl set_policy dlx \".*\" '{\"dead-letter-exchange\":\"dlx\",\"delivery-limit\":{{MAX_ATTEMPTS}}}' --apply-to quorum_queues\ngroups:\n- name: messaging\n rules:\n - alert: QueueWithoutConsumer\n expr: rabbitmq_queue_messages_ready > 0 and rabbitmq_queue_consumers == 0\n for: {{LAG_MINUTES}}m\n - alert: QueueStuck\n expr: rabbitmq_queue_messages_ready > 0 and delta(rabbitmq_queue_messages_ready[{{LAG_MINUTES}}m]) >= 0\n for: {{LAG_MINUTES}}m\n - alert: DeadLetters\n expr: rabbitmq_queue_messages{queue=~\".+\\\\.dlq\"} > 0\n```",
688
+ "hubWhen": {
689
+ "BROKER": [
690
+ "rabbitmq"
691
+ ]
692
+ }
693
+ },
694
+ {
695
+ "id": "ff-sqs",
696
+ "type": "fitness-fn",
697
+ "label": "SQS age and dead letters",
698
+ "x": 1040,
699
+ "y": 910,
700
+ "category": "operational",
701
+ "threshold": "An alarm fires when ApproximateAgeOfOldestMessage exceeds {{LAG_MINUTES}} minutes or a dead-letter queue holds a message; every queue has a redrive policy with maxReceiveCount = {{MAX_ATTEMPTS}}",
702
+ "description": "The queues, their dead-letter queues and their CloudWatch alarms are defined together in Terraform, so a queue cannot exist without its redrive policy and alarms.\n\nTool: Amazon CloudWatch alarms (Terraform)\n\n```hcl\nresource \"aws_sqs_queue\" \"orders_dlq\" { name = \"orders-dlq\" }\n\nresource \"aws_sqs_queue\" \"orders\" {\n name = \"orders\"\n redrive_policy = jsonencode({ deadLetterTargetArn = aws_sqs_queue.orders_dlq.arn, maxReceiveCount = {{MAX_ATTEMPTS}} })\n}\n\nresource \"aws_cloudwatch_metric_alarm\" \"orders_age\" {\n alarm_name = \"orders-oldest-message\"\n namespace = \"AWS/SQS\"\n metric_name = \"ApproximateAgeOfOldestMessage\"\n dimensions = { QueueName = aws_sqs_queue.orders.name }\n statistic = \"Maximum\"\n period = 60\n evaluation_periods = 1\n threshold = {{LAG_MINUTES}} * 60\n comparison_operator = \"GreaterThanThreshold\"\n}\n\nresource \"aws_cloudwatch_metric_alarm\" \"orders_dead_letters\" {\n alarm_name = \"orders-dead-letters\"\n namespace = \"AWS/SQS\"\n metric_name = \"ApproximateNumberOfMessagesVisible\"\n dimensions = { QueueName = aws_sqs_queue.orders_dlq.name }\n statistic = \"Maximum\"\n period = 60\n evaluation_periods = 1\n threshold = 0\n comparison_operator = \"GreaterThanThreshold\"\n}\n```",
703
+ "hubWhen": {
704
+ "BROKER": [
705
+ "sqs"
706
+ ]
707
+ }
708
+ },
709
+ {
710
+ "id": "ff-registry",
711
+ "type": "fitness-fn",
712
+ "label": "Schemas compatible before merge",
713
+ "x": 1040,
714
+ "y": 1040,
715
+ "category": "process",
716
+ "threshold": "Every changed schema is compatible with all registered versions of its subject before merge; 0 incompatible registrations",
717
+ "description": "A CI step asks the registry whether each changed schema is compatible with every version of its subject under the subject's mode, and fails on the first that is not.\n\nTool: Confluent Schema Registry compatibility API (Apicurio Registry offers the same check)\n\n```bash\n#!/usr/bin/env bash\nset -euo pipefail\nfor file in $(git diff --name-only origin/main -- 'schemas/*.avsc'); do\n subject=\"$(basename \"$file\" .avsc)-value\"\n body=$(jq -n --rawfile s \"$file\" '{schemaType: \"AVRO\", schema: $s}')\n curl -sf -u \"$SR_KEY:$SR_SECRET\" -H 'Content-Type: application/vnd.schemaregistry.v1+json' \\\n -d \"$body\" \"$SCHEMA_REGISTRY_URL/compatibility/subjects/$subject/versions?verbose=true\" \\\n | jq -e '.is_compatible' > /dev/null || { echo \"incompatible: $file\"; exit 1; }\ndone\n```",
718
+ "hubWhen": {
719
+ "SCHEMA": [
720
+ "registry"
721
+ ]
722
+ }
723
+ },
724
+ {
725
+ "id": "ff-asyncapi",
726
+ "type": "fitness-fn",
727
+ "label": "AsyncAPI break check",
728
+ "x": 1040,
729
+ "y": 1170,
730
+ "category": "structural",
731
+ "threshold": "0 breaking changes between the last release's AsyncAPI document and the pull request",
732
+ "description": "In every pull request, the AsyncAPI CLI diffs the document with the one of the last release tag and the step fails when it reports a breaking change.\n\nTool: AsyncAPI CLI (asyncapi diff)\n\n```yaml\n# .github/workflows/messages.yml (a job step)\n- name: No breaking message changes\n run: |\n git fetch --tags\n git show \"$(git describe --tags --abbrev=0)\":asyncapi.yaml > /tmp/base.yaml\n npx @asyncapi/cli diff /tmp/base.yaml asyncapi.yaml --type breaking --format json > /tmp/breaking.json\n jq -e 'length == 0' /tmp/breaking.json\n```",
733
+ "hubWhen": {
734
+ "SCHEMA": [
735
+ "repo"
736
+ ]
737
+ }
738
+ }
739
+ ],
740
+ "relations": [
741
+ {
742
+ "id": "req-envelope--derives--need",
743
+ "sourceId": "req-envelope",
744
+ "targetId": "need",
745
+ "relationType": "derives"
746
+ },
747
+ {
748
+ "id": "req-dedupe--derives--need",
749
+ "sourceId": "req-dedupe",
750
+ "targetId": "need",
751
+ "relationType": "derives"
752
+ },
753
+ {
754
+ "id": "req-outbox--derives--need",
755
+ "sourceId": "req-outbox",
756
+ "targetId": "need",
757
+ "relationType": "derives"
758
+ },
759
+ {
760
+ "id": "req-dlq--derives--need",
761
+ "sourceId": "req-dlq",
762
+ "targetId": "need",
763
+ "relationType": "derives"
764
+ },
765
+ {
766
+ "id": "req-lossy--derives--need",
767
+ "sourceId": "req-lossy",
768
+ "targetId": "need",
769
+ "relationType": "derives"
770
+ },
771
+ {
772
+ "id": "req-order--derives--need",
773
+ "sourceId": "req-order",
774
+ "targetId": "need",
775
+ "relationType": "derives"
776
+ },
777
+ {
778
+ "id": "req-stale--derives--need",
779
+ "sourceId": "req-stale",
780
+ "targetId": "need",
781
+ "relationType": "derives"
782
+ },
783
+ {
784
+ "id": "req-schema-registry--derives--need",
785
+ "sourceId": "req-schema-registry",
786
+ "targetId": "need",
787
+ "relationType": "derives"
788
+ },
789
+ {
790
+ "id": "req-schema-repo--derives--need",
791
+ "sourceId": "req-schema-repo",
792
+ "targetId": "need",
793
+ "relationType": "derives"
794
+ },
795
+ {
796
+ "id": "req-lag--derives--need",
797
+ "sourceId": "req-lag",
798
+ "targetId": "need",
799
+ "relationType": "derives"
800
+ },
801
+ {
802
+ "id": "sc-envelope--verifies--req-envelope",
803
+ "sourceId": "sc-envelope",
804
+ "targetId": "req-envelope",
805
+ "relationType": "verifies"
806
+ },
807
+ {
808
+ "id": "sc-dedupe--verifies--req-dedupe",
809
+ "sourceId": "sc-dedupe",
810
+ "targetId": "req-dedupe",
811
+ "relationType": "verifies"
812
+ },
813
+ {
814
+ "id": "sc-outbox--verifies--req-outbox",
815
+ "sourceId": "sc-outbox",
816
+ "targetId": "req-outbox",
817
+ "relationType": "verifies"
818
+ },
819
+ {
820
+ "id": "sc-dlq--verifies--req-dlq",
821
+ "sourceId": "sc-dlq",
822
+ "targetId": "req-dlq",
823
+ "relationType": "verifies"
824
+ },
825
+ {
826
+ "id": "sc-lossy--verifies--req-lossy",
827
+ "sourceId": "sc-lossy",
828
+ "targetId": "req-lossy",
829
+ "relationType": "verifies"
830
+ },
831
+ {
832
+ "id": "sc-order--verifies--req-order",
833
+ "sourceId": "sc-order",
834
+ "targetId": "req-order",
835
+ "relationType": "verifies"
836
+ },
837
+ {
838
+ "id": "sc-stale--verifies--req-stale",
839
+ "sourceId": "sc-stale",
840
+ "targetId": "req-stale",
841
+ "relationType": "verifies"
842
+ },
843
+ {
844
+ "id": "sc-schema-registry--verifies--req-schema-registry",
845
+ "sourceId": "sc-schema-registry",
846
+ "targetId": "req-schema-registry",
847
+ "relationType": "verifies"
848
+ },
849
+ {
850
+ "id": "sc-schema-repo--verifies--req-schema-repo",
851
+ "sourceId": "sc-schema-repo",
852
+ "targetId": "req-schema-repo",
853
+ "relationType": "verifies"
854
+ },
855
+ {
856
+ "id": "sc-lag--verifies--req-lag",
857
+ "sourceId": "sc-lag",
858
+ "targetId": "req-lag",
859
+ "relationType": "verifies"
860
+ },
861
+ {
862
+ "id": "ff-dupes--implements--adr-least",
863
+ "sourceId": "ff-dupes",
864
+ "targetId": "adr-least",
865
+ "relationType": "implements"
866
+ },
867
+ {
868
+ "id": "ff-outbox--implements--adr-least",
869
+ "sourceId": "ff-outbox",
870
+ "targetId": "adr-least",
871
+ "relationType": "implements"
872
+ },
873
+ {
874
+ "id": "ff-lossy--implements--adr-most",
875
+ "sourceId": "ff-lossy",
876
+ "targetId": "adr-most",
877
+ "relationType": "implements"
878
+ },
879
+ {
880
+ "id": "ff-stale--implements--adr-least",
881
+ "sourceId": "ff-stale",
882
+ "targetId": "adr-least",
883
+ "relationType": "implements"
884
+ },
885
+ {
886
+ "id": "ff-stale--implements--adr-most",
887
+ "sourceId": "ff-stale",
888
+ "targetId": "adr-most",
889
+ "relationType": "implements"
890
+ },
891
+ {
892
+ "id": "ff-order--implements--adr-kafka",
893
+ "sourceId": "ff-order",
894
+ "targetId": "adr-kafka",
895
+ "relationType": "implements"
896
+ },
897
+ {
898
+ "id": "ff-order--implements--adr-rabbitmq",
899
+ "sourceId": "ff-order",
900
+ "targetId": "adr-rabbitmq",
901
+ "relationType": "implements"
902
+ },
903
+ {
904
+ "id": "ff-order--implements--adr-sqs",
905
+ "sourceId": "ff-order",
906
+ "targetId": "adr-sqs",
907
+ "relationType": "implements"
908
+ },
909
+ {
910
+ "id": "ff-kafka--implements--adr-kafka",
911
+ "sourceId": "ff-kafka",
912
+ "targetId": "adr-kafka",
913
+ "relationType": "implements"
914
+ },
915
+ {
916
+ "id": "ff-rabbitmq--implements--adr-rabbitmq",
917
+ "sourceId": "ff-rabbitmq",
918
+ "targetId": "adr-rabbitmq",
919
+ "relationType": "implements"
920
+ },
921
+ {
922
+ "id": "ff-sqs--implements--adr-sqs",
923
+ "sourceId": "ff-sqs",
924
+ "targetId": "adr-sqs",
925
+ "relationType": "implements"
926
+ },
927
+ {
928
+ "id": "ff-registry--implements--adr-registry",
929
+ "sourceId": "ff-registry",
930
+ "targetId": "adr-registry",
931
+ "relationType": "implements"
932
+ },
933
+ {
934
+ "id": "ff-asyncapi--implements--adr-schema-repo",
935
+ "sourceId": "ff-asyncapi",
936
+ "targetId": "adr-schema-repo",
937
+ "relationType": "implements"
938
+ }
939
+ ]
940
+ }