> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-bulkdlqdelete.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Create a Kafka cluster in seconds

<Check>
  **Prerequisite**

  You need an account before creating a cluster, create one
  [here](https://console.upstash.com).
</Check>

## Create a Kafka Cluster

Once you logged in, you can create a Kafka cluster by clicking on the **Create
Cluster** button.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/create-cluster.png" />
</Frame>

**Name:** Type a name for the Kafka cluster.

**Region:** Please select the region in which you would like your cluster to be
deployed. To optimize performance, it is recommended to choose the region that
is closest to your applications. We have plans to expand our support to other
regions and cloud providers in the future. Please send your requests to
[feedback@upstash.com](mailto:feedback@upstash.com) to expedite it.

**Type:** Select the cluster type. Currently there are only two options, choose
single replica for testing/development, multi replica for production use cases:

* **Single Replica:** Topics created in the single replica cluster will only
  have single replica.
* **Multi Replica:** Topics created in the multi replica cluster will have three
  replicas.

Upon clicking the **Create** button, you will be presented with a list of your
clusters as shown below:

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/cluster-list.png" />
</Frame>

You can click on a cluster to navigate to the details page of related cluster.
Details section contains the necessary configurations and credentials.

<Frame caption="Cluster details page, which shows the cluster bootstrap endpoint, username and password.">
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/cluster-detail.png" />
</Frame>

## Create a Topic

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/tapic-tab.png" />
</Frame>

To create a new topic, switch to the **Topics** tab in cluster details page, and
click the **Create topic** button:

<Frame>
  {" "}

  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/create-topic.png" />
</Frame>

Type a name for your topic and pick a partition count according to your
application's needs.

<Warning>
  Note that Kafka topic names can contain only alphanumerics, underscore (\_),
  hyphen (-) and dot (.) characters.
</Warning>

You can also change some advanced properties such as

* <Tooltip tip="Retention time in Kafka determines how long messages are stored in a topic before they are eligible for deletion. It allows you to control how long data remains available for consumption.">
    {" "}

    Retention Time
  </Tooltip>

* <Tooltip tip="Retention size in Kafka determines the maximum data capacity of a topic. It allows you to manage storage space by automatically discarding older messages when the size threshold is reached.">
    {" "}

    Retention Size
  </Tooltip>

* <Tooltip tip="Cleanup policy in Kafka defines how obsolete messages are managed within a topic. It specifies the rules for retaining or removing messages based on specific criteria, such as time or space.">
    {" "}

    Cleanup Policy
  </Tooltip>

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/topic-advanced.png" />
</Frame>

Upon creating the topic, you will have access to a topics list that provides an
overview of the topic's configuration and usage details. This list allows you to
view and modify the topic configuration, as well as delete the topic if needed.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/topics-list.png" />
</Frame>

## Connect to Cluster

To establish a connection with the Kafka cluster, you have the flexibility to
utilize any Kafka clients of your choice. In the cluster details section, you
will find code snippets specifically designed for several popular Kafka clients.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/connect-clients.png" />
</Frame>

Normally username and password will be shown as `{{ UPSTASH_KAFKA_USERNAME }}`
and `{{ UPSTASH_KAFKA_PASSWORD }}`. By turning on "Show secrets" toggle, these
secrets will be replaced with the actual values of your cluster. For more info
about using Kafka clients see [Kafka API](./kafkaapi/) section.

Alternatively, you can use the REST API to connect the cluster. For more info
about using the REST API see [Kafka REST API](../rest/restintro).

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-bulkdlqdelete/img/kafka/getting_started/connect-rest.png" />
</Frame>
