> For the complete documentation index, see [llms.txt](https://ztrust.gitbook.io/livestreamiq/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ztrust.gitbook.io/livestreamiq/readme/3.-guide-to-navigation/3.4-cluster-overview/3.4.4-topic.md).

# 3.4.4 Topic

Topic in Kafka is a logical channel used to organize and store messages. Producers publish messages to a topic, and consumers read messages from the same topic for data processing.

![](/files/OpPmnbr1wTrL7NlPluTs)

1. **Topic Name:** The unique name of the Kafka topic that stores messages.&#x20;
2. **Partition:** A division of a topic that enables parallel data storage and processing.
3. **Out of sync replicas:** The number of replicas that are not synchronized with the leader partition.&#x20;
4. **Replication Factor:** The total number of copies of each partition maintained across brokers.&#x20;
5. **Number of Messages:** The total number of messages currently stored in the topic.&#x20;
6. **Size:** The total storage space used by the topic and its messages.&#x20;
7. **Show Internal Topics:** Displays Kafka's internal topics used for managing cluster operations.

### **I. Topic Management**

The Topic Management module enables administrators to create, view, search, and manage Kafka topics within a selected cluster. It also provides detailed information about each topic, including configuration, partitions, messages, consumers, and runtime statistics.

1. **To Accessing Topic Management**\
   \
   Step 1: From the Select Clusters dropdown, choose the Kafka cluster you want to manage.<br>

   ![](/files/JlrwnsI2fNIfThBRdhrv)

   \
   Step 2: Click the Topic tab. The Topics page displays all available topics within the selected cluster.<br>

   ![](/files/8hSxZ40xrv5wNqsDAhPH)
2. **Topics List**\
   \
   The Topics page provides a complete overview of all Kafka topics available in the selected cluster.<br>

   ![](/files/a0yGZcfgNGaBqS6IWaRJ)

   | Column               | Description                                     |
   | -------------------- | ----------------------------------------------- |
   | Topic Name           | Name of the Kafka topic                         |
   | Partitions           | Number of partitions assigned to the topic      |
   | Out of Sync Replicas | Number of replicas that are not synchronized    |
   | Replication Factor   | Number of copies maintained for fault tolerance |
   | Number of Messages   | Total messages stored in the topic              |
   | Size                 | Storage consumed by the topic                   |
3. **Searching for a Topic**\
   Use the search bar to quickly locate a topic. Enter the topic name into the Search by Topic Name field.<br>

   ![](/files/odqopoZ25j2zyNborrDD)
4. **Viewing Internal Topics**\
   \
   Kafka creates internal topics for system operations.

   \
   To display internal topics:

   1. Enable the **Show Internal Topics** toggle.

   2. Internal topics such as **\_\_consumer\_offsets** become visible.<br>

      ![](/files/H5ZrOvB80fwRF03fBqnI)

   3. When the user **turn-on** the button it showing all the internal topics.<br>

      ![](/files/XGFSThibdlfwuTLXmkzo)
5. **To Creating a New Topic**\
   \
   Step 1 :Click on the Add a topic button.<br>

   <img src="/files/SlY60OXEdgixbxm2Cf9E" alt="" height="52" width="145">

   \
   Step 2 : After clicking the button, the following page opens. <br>

   <figure><img src="/files/kAI7jE5cv0cyL4ReTz0L" alt=""><figcaption></figcaption></figure>

   \
   Step 3- Fill the topic configuration details as per the user requirement.

   1. **Topic Name:** Enter a unique name for the topic.
   2. **Number of Partitions**: Specify the number of partitions for the topic. Higher partitions improve parallel processing.
   3. **Cleanup Policy:** Select how old messages should be handled.
      1. Delete – Messages are removed after the retention period.
      2. Compact (if available) – Retains only the latest record for each key.
   4. **Min In Sync Replicas:** Enter the minimum number of replicas that must acknowledge a write.
   5. **Replication Factor:** Specify the number of replicas to maintain for each partition. The replication factor should not exceed the number of brokers.
   6. **Time to Retain Data (ms):** Set the message retention period in milliseconds or use the predefined options.
   7. **Max Size on Disk (GB):** Specify the maximum disk space allocated for the topic.
   8. **Maximum Message Size (Bytes):** Define the maximum size allowed for a single message.
   9. **Custom Parameters:** Add additional topic configuration parameters, if required.when you Add Custom Parameter opens two fields.<br>

      ![](/files/Iiu4WjwyhlqfQoivPwtU)

      1. **Create Topic:** Click to create the topic with the specified configuration.
      2. **Cancel:** Click to discard the changes and return to the previous page.

*After entering all the required information, the Create Topic button becomes enabled. Click the button to create the new Kafka topic successfully.*

6. To View Individual Topic Details
   1. Click the required topic to view its detailed information.<br>

      <figure><img src="/files/nubwdFXBlGIsIzMF6RXl" alt=""><figcaption></figcaption></figure>

   2. Upon clicking on the individual topics, the user finds the below tabs of that topic.
      1. **Overview Tab:** The Overview tab displays the overall health and configuration of the topic.

      2. **Messages Tab:** The Messages tab allows users to browse and search messages stored within the topic.<br>

         <figure><img src="/files/amK0lpvBQJGaWZrmk7fB" alt=""><figcaption></figcaption></figure>

         \
         Other Available options include:

         1. Search by key or value
         2. Select Key Serializer
         3. Select Value Serializer
         4. Choose partition
         5. Select message retrieval order (Newest or Oldest)

      3. **Consumers Tab:** The Consumers tab displays consumer groups subscribed to the selected topic. This monitors consumer activity and processing lag.<br>

         <figure><img src="/files/B4VtffaaBCP7BiOCcZG1" alt=""><figcaption></figcaption></figure>

      4. **Settings Tab:** The Settings tab displays all Kafka configuration properties associated with the topic.<br>

         <figure><img src="/files/LQf53l61I97tAvRgZ0Sn" alt=""><figcaption></figcaption></figure>

         \
         Each configuration includes:<br>

         | Column        | Description                         |
         | ------------- | ----------------------------------- |
         | Key           | Kafka configuration property        |
         | Value         | Configured value                    |
         | Default Value | Kafka default value (if applicable) |

      5. **Statistics Tab:** The Statistics tab provides runtime metrics for the topic.\
         \
         After click on '**Start Analysis**', it will produce the runtime metrics analysis.
7. Produce Messages\
   \
   Messages can be published directly to a topic.<br>

   <figure><img src="/files/cP3zVjS9imkYxh7WACmJ" alt=""><figcaption></figcaption></figure>

   \
   Step 1 - Open the topic.\
   Step 2 - Click Produce Message.\
   Step 3 - Enter the required message details.\
   Typical fields include:

   1. Key (optional)
   2. Value (required)
   3. Headers (if supported)

   Step 4 - Click Send or Produce.\
   \
   The message is published to the selected topic.
8. To Copy Topic\
   \
   Step 1 - Select a topic.\
   Step 2 - Click Copy Selected Topic.\
   Step 3 - Specify the new topic name and configuration.\
   Step 4 - Confirm the operation.
9. To Purge Messages\
   \
   Step 1 - Select a topic.\
   Step 2 - Click Purge Messages of Selected Topics.\
   Step 3 - Confirm the action.\
   \
   This removes all messages while retaining the topic configuration.
10. To Migrate Topic\
    \
    Step 1 - Select one or more topics.\
    Step 2 - Click Migrate Topics from One Kafka Cluster to Another.\
    Step 3 - Select the destination cluster.\
    Step 4 - Start the migration.\
    Step 5 - Monitor the migration status until completion.
