Class ModuleTopicProvisioner

java.lang.Object
ai.pipestream.registration.topics.ModuleTopicProvisioner

@ApplicationScoped public class ModuleTopicProvisioner extends Object
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 Details

    • ModuleTopicProvisioner

      public ModuleTopicProvisioner()
  • Method Details

    • ensureModuleTopic

      public void ensureModuleTopic(String moduleName)
      Idempotently ensure pipestream.module.<moduleName> exists. Returns normally whether the topic was created or already existed. Blocking — call from a virtual thread.