<a id="cp-intellij-idea-plugin"></a>

# Confluent Plugin for JetBrains IDEs for Confluent Platform

The Confluent Plugin for JetBrains IDEs lets you connect to Confluent Platform and
other Apache Kafka® clusters from inside IntelliJ IDEA and other JetBrains
IDEs to browse clusters, create topics, and produce and consume
messages without leaving your editor.

![image](.hidden/docs-common/home/includes/kafka-plugin-for-jetbrains-ides/images/kafka-plugin-for-jetbrains-ides.png)
<br/>
<!-- Overview -->
<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->

The Confluent Plugin for JetBrains IDEs enables you to work with Kafka
directly from an IntelliJ-based IDE, like IDEA. The plugin provides a
comprehensive set of tools for monitoring and managing Kafka event-streaming
processes.

The plugin enables you to:

- Connect to Kafka clusters with support for various authentication methods
- Produce and consume messages in different formats, like JSON, Avro, and
  Protobuf
- Manage topics and monitor consumer groups
- Integrate with schema registries: Confluent Schema Registry and AWS Glue Schema
  Registry
- Use SSH tunneling and SSL connections
- Integrate with Spring Boot for Kafka connections

The plugin provides a dedicated tool window with an intuitive UI for
interacting with Kafka clusters, making it easier to develop and test
Kafka-based applications.

## Install in IntelliJ IDEA

The following steps show you how to install the Confluent Plugin for
JetBrains IDEs in IntelliJ IDEA.

1. Open IntelliJ IDEA.
2. In the navigation menu, click **Plugins**, or press ⌘+Option+S (macOS) or
   CTRL+ALT+S (Windows/Linux) to open the **Settings** dialog, and select
   **Plugins**.
3. In the search text box, type “confluent” and select the **Confluent**
   plugin.
4. Click **Install**, and in the Third-Party Plugins dialog, click **Accept**.
5. Restart IntelliJ IDEA. Open an existing project or create a new project.
6. In the Tool window bar, click **Confluent**. Or, open the tool window
   with **View** > **Tool Windows** > **Confluent**.

   The Confluent tool window opens.

## Add a new connection to a Kafka cluster

<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->
1. Click **+** to add a new connection to a Kafka cluster.
2. Select **Message Brokers** and click **+**, or select Confluent Cloud and
   **Sign in** to access your clusters in Confluent Cloud from the IntelliJ plugin.
3. If you selected a new Kafka cluster not hosted in Confluent Cloud, click
   **Test connection** after entering details.
4. When the test result is **Connected**, click **OK**.

   The Confluent tool window updates to show the topics in the cluster.

## Create a new topic

<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->

The Confluent Plugin for JetBrains IDEs enables creating Kafka topics
within the IDE.

1. Right-click on a cluster or the **Topics** tab and click **+ Create Topic**
   to create a new topic.

   The **Create Topic** dialog opens.
2. In the **Topic name** text box, enter “input_topic”.

   For the **Partition count** and **Replication factor** settings, accept
   the default values.
3. Click **OK**.

   The new topic appears in the **Topics** list.

## Produce to a topic

<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->

The Confluent Plugin for JetBrains IDEs enables producing messages to
Kafka topics within the IDE. In this step, you produce a message to the
topic you created in the previous step.

1. After creating a new topic, click **Producer** above the topic to configure
   and launch a producer.

   A new tab opens with a corresponding **Configuration** section.
2. Select **String** for the key and value type.
3. In the **Flow** section, select **Generate random keys** and
   **Generate random values**.
4. Click **Produce**.

   The **Data** section updates to show the message you produced.
5. In the **Data** section, double-click on the topic name.

   The **Details** panel opens and shows the message’s **Key** and **Value**.
   Scroll down to see the message’s header and metadata.

## Consume from a topic

<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->

The Confluent Plugin for JetBrains IDEs enables consuming messages from
Kafka topics within the IDE. In this step, you consume a message from the
topic you created earlier.

1. Click **Consumer** above the topic you created to configure and launch
   a consumer.

   A new tab opens with a corresponding **Configuration** section.
2. In **Range and Filters**, select **From the beginning** and click
   **Start Consuming**.

   The **Consumer** starts consuming messages from the topic.
3. Click the **Producer** tab, and click **Produce**.
4. Return to the **Consumer** tab. The **Data** section shows the message
   you produced in the previous step.
5. Click **Stop Consuming**.

## Related content

- [Confluent for VS Code](vscode/overview.md#cp-vscode-extension)
- [Client Applications](overview.md#cp-build-apps)

#### NOTE
This website includes content developed at the [Apache Software Foundation](https://www.apache.org/)
under the terms of the [Apache License v2](https://www.apache.org/licenses/LICENSE-2.0.html).
