Connecting REST Proxy to Confluent Cloud

You may configure a local Confluent REST Proxy to produce to and consume from a Apache Kafka® topic in a Kafka cluster in Confluent Cloud.

To connect REST Proxy to Confluent Cloud, you must download the Confluent Platform tarball and then start REST Proxy by using a customized properties file.

  1. Download Confluent Platform and extract the contents.

  2. Create a topic named rest-proxy-test by using the Confluent Cloud CLI:

    ccloud kafka topic create --partitions 4 rest-proxy-test
  3. Create a properties file.

    1. Find the client settings for your cluster by clicking CLI & client configuration from the Confluent Cloud web interface and copy the configuration.


      They should look like the following:

      bootstrap.servers=<BOOTSTRAP_SERVERS> required username="<api-key>" password="<api-secret>";
    2. Create a properties file named

      cd <path-to-confluent>
    3. Paste the client config contents and add the client. prefix to each of security properties. For example:

      client.sasl.mechanism=PLAIN required \
      username="<api-key>" password="<api-secret>";
      # consumer only properties must be prefixed with consumer.
      # producer only properties must be prefixed with producer.
      # admin client only properties must be prefixed with admin.
      # uncomment and set correct value if using with schema registry

      Producers, consumers, and admin client will share the client. properties. To specify properties only for the producer or consumer, use the following table:

      Component Prefix Example
      Admin Client admin.
      Consumer consumer.
      Producer producer. producer.acks
  4. (Optional) Add configs for Confluent Cloud Schema Registry per the examples on GitHub at ccloud/examples/template_delta_configs.

  5. Start the REST Proxy.

  6. Make REST calls using v2 of the REST API (e.g. application/vnd.kafka.v2+json) because v2 has no ZooKeeper dependency. Using v1 of the API (e.g. application/vnd.kafka.v1+json) will not work because v1 has a ZooKeeper dependency that does not work with Confluent Cloud.