Creating a Topic

Create a topic for Apache Kafka Wire Protocol.

Prerequisites

  • Topic with the name must not already exist on the fabric.
  • You must be a fabric user to create a topic on the fabric.

About this task

One or more topics for Apache Kafka Wire Protocol can be created on a fabric, via the Data Fabric UI.

Data is stored in topics in the form of messages for the retention period specified while creating the topic. The retention period can be specified in seconds, minutes, hours, or days. The default unit for retention period is days.

Data can be stored in uncompressed and compressed formats in topics. By default, data on topics is uncompressed.

Data compression helps reduce network bandwidth usage and saves disk space. Data compression results in higher CPU utilization.

Data Fabric supports the following algorithms to compress data in a topic.

  • LZ4 - LZ4 is an extremely fast /high-speed lossless compression algorithm.
  • LZF – java-based compression algorithm that is optimized for speed with modest data compression
  • ZLib – Zlib is an open-source mechanism to provide for lossless compression.

If you wish to store data in a compressed format on the topic, you can select the compression algorithm based on your environment and requirement.

Follow the steps given below to create a topic.

Procedure

  1. Log on to the Data Fabric UI.
  2. Select Fabric user option from the dropdown on the Home page.
  3. Click Topic seen next to Create on the Resources card.
  4. Enter the topic name.
  5. Select the fabric on which you wish to create the topic.
  6. Enter the number of partitions for the topic
  7. Enter time to live for the topic. This is the duration for which messages are retained within the topic.
  8. Choose the compression type.
  9. Click Create.

Results

The topic is created on the specified fabric. A message regarding the topic creation is displayed on the Data Fabric UI.
Related maprcli Commands
To implement the features described on this page, the Data Fabric UI relies on the following maprcli command. The command is provided for general reference. For more information, see maprcli Commands in This Guide.