Class KafkaProxy

java.lang.Object
io.kroxylicious.proxy.KafkaProxy
All Implemented Interfaces:
AutoCloseable

public final class KafkaProxy extends Object implements AutoCloseable
  • Constructor Details

  • Method Details

    • startup

      public CompletableFuture<Void> startup()
      Starts this proxy.
      Returns:
      a future that completes when the proxy stops (normally or exceptionally).
    • reconfigure

      public CompletableFuture<ReconfigureResult> reconfigure(Configuration newConfig)
      Apply the given configuration to this running proxy, restarting only the virtual clusters whose effective configuration differs from the current running state. Unaffected clusters continue serving traffic throughout the reconfigure.

      See ConfigurationReloadOrchestrator for the full pipeline shape (pre-flight static-section diff, concurrency control, change detection, per-VC execution, result construction).

      Parameters:
      newConfig - the desired end-state configuration; must be non-null
      Returns:
      a future that completes with the reconfigure outcome
      Throws:
      NullPointerException - if newConfig is null
      IllegalStateException - if the proxy is not in the running state
    • shutdown

      public CompletableFuture<Void> shutdown()
      Shuts down a running proxy. Idempotent: safe to call from any thread, including JVM shutdown hooks, and safe to call before startup() or after already stopped.
      Returns:
      a future that completes when shutdown is complete, identically to the future returned by startup()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable