Connecting Kafka Streams to Confluent Cloud

You can connect Kafka Streams to your Confluent Platform Kafka cluster in Confluent Cloud.


To connect Streams to Confluent Cloud, update your existing configs with the properties described here.

  1. Create a java.util.Properties instance.

  2. Configure your streams application. Kafka and Kafka Streams configuration options must be configured in the java.util.Properties instance before using Streams. For example:

    # Comma-separated list of the the Confluent Cloud broker endpoints. For example:
    bootstrap.servers=<broker-endpoint1, broker-endpoint2, broker-endpoint3>
    sasl.jaas.config=\ required \
        username="<confluent cloud access key>" \
        password="<confluent cloud secret>";
    # Recommended performance settings
    # Unique application ID string<app-id>
    # Local file system directory where application state is stored
    state.dir = <app-state-storage>
    # Client ID for your embedded producer, consumer and admin clients. This is useful for debugging to override = <client-id>
    # Default is 0; override to non-zero values for fast rebalance
    num.standby.replicas = <num-replicas>
    # Key serde class name. This usually must be overridden
    default.key.serde = <serde-class-name>
    # Value serde class name. This setting must usually be overridden
    default.value.serde = <value-serde-name>

For more information, see Configuring a Streams Application.