feat(attachments): add durable Kafka image processing

This commit is contained in:
2026-11-26 18:55:59 +03:00
parent 276dbdad8a
commit f0fc096948
105 changed files with 15987 additions and 7 deletions
+9
View File
@@ -2,6 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:mtusi:messenger:attachment-job:v1",
"title": "Durable attachment processing job v1",
"description": "Kafka topic attachments.process.v1, key attachment_id. Each publication starts with attempt=1 and job_id=attachment_id. Managed retry state is stored in PostgreSQL while the consumer keeps the offset uncommitted. An explicit replay increments generation; absent generation means 0.",
"type": "object",
"additionalProperties": false,
"required": [
@@ -36,6 +37,13 @@
"type": "integer",
"minimum": 1
},
"generation": {
"type": "integer",
"minimum": 0,
"maximum": 2147483647,
"default": 0,
"description": "Replay generation. Automatic retries and broker redelivery retain the same generation."
},
"created_at": {
"type": "string",
"format": "date-time"
@@ -56,6 +64,7 @@
"type": "attachment.process.v1",
"attachment_id": "22222222-2222-4222-8222-222222222222",
"pipeline_version": 1,
"generation": 0,
"attempt": 1,
"created_at": "2026-09-01T12:00:00Z"
}