Class ModuleTopicProvisioner
java.lang.Object
ai.pipestream.registration.topics.ModuleTopicProvisioner
Creates the per-service module-work Kafka topic at module-registration
time. One topic per module service:
pipestream.module.<moduleName> — no cluster/graph/node (routing
identity rides the PipeStream). Single-owner by construction
(registration runs in platform-registration-service), idempotent, and
created with explicit partitions (NOT broker-default auto-create).
Mirrors the engine's KafkaTopicRegistrar.ensureProcessingTopic
idempotent pattern (listTopics → skip if present → createTopics). The
blocking AdminClient work runs directly on the caller's virtual thread,
so it never pins the Vert.x event loop. Topic-ensure failure is isolated
by the caller — module registration must not fail because Kafka hiccuped.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidensureModuleTopic(String moduleName) Idempotently ensurepipestream.module.<moduleName>exists.
-
Constructor Details
-
ModuleTopicProvisioner
public ModuleTopicProvisioner()Creates the provisioner bean. The KafkaAdminClientis built ininit()once CDI has injected the configured bootstrap servers.
-
-
Method Details
-
ensureModuleTopic
Idempotently ensurepipestream.module.<moduleName>exists. Returns normally whether the topic was created or already existed. Blocking — call from a virtual thread.- Parameters:
moduleName- the module name whose work topic should be ensured
-