From b62b92fe1a655924b02768daf4a082c3df167ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Tailland?= Date: Mon, 31 Aug 2026 16:17:05 +0200 Subject: [PATCH] Add the procurement topic and Supply's write access to it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit reorder.requested and its answer (confirmed/rejected) share the topic, keyed by the reorder id, so ordering between the ask and the answer holds the way it does for a product's own facts on classic-models.catalog. Supply both writes and reads this topic — one service, two capacities, not a separate procurement identity, per the 2026-08-31 decision. Co-Authored-By: Claude Opus 5 --- kafka-topology/classic-models.yaml | 35 ++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/kafka-topology/classic-models.yaml b/kafka-topology/classic-models.yaml index 3d4beac..db494f6 100644 --- a/kafka-topology/classic-models.yaml +++ b/kafka-topology/classic-models.yaml @@ -63,6 +63,25 @@ spec: retention.ms: "604800000" cleanup.policy: delete min.insync.replicas: "1" +--- +# A supply request and its own answer, on one topic: reorder.requested and its +# eventual reorder.confirmed/reorder.rejected share a subject — the reorder id +# — so ordering between "asked" and "answered" holds the way it does for a +# product's own facts on classic-models.catalog. +apiVersion: kafka.strimzi.io/v1 +kind: KafkaTopic +metadata: + name: classic-models.procurement + namespace: kafka + labels: + strimzi.io/cluster: kafka +spec: + partitions: 3 + replicas: 1 + config: + retention.ms: "604800000" + cleanup.policy: delete + min.insync.replicas: "1" # --- accounts --------------------------------------------------------------- # @@ -92,8 +111,12 @@ spec: - Write - Describe --- -# The supply agent. Reads the catalog topic only — an agent whose job is stock -# has no business reading who paid what. +# The supply agent. Reads the catalog topic — its job is stock, it has no +# business reading who paid what. It also both writes AND reads its own +# procurement topic: it raises a reorder request and answers its own request +# a moment later (this is one service acting in two capacities, not two +# services, per the 2026-08-31 decision that réapprovisionnement stays one +# service rather than splitting into a separate procurement identity). apiVersion: kafka.strimzi.io/v1 kind: KafkaUser metadata: @@ -114,6 +137,14 @@ spec: operations: - Read - Describe + - resource: + type: topic + name: classic-models.procurement + patternType: literal + operations: + - Read + - Write + - Describe - resource: type: group name: supply-