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
- Log on to the Data Fabric UI.
- Select Fabric user option from the dropdown on the Home page.
- Click Topic seen next to Create on the Resources card.
- Enter the topic name.
- Select the fabric on which you wish to create the topic.
- Enter the number of partitions for the topic
- Enter time to live for the topic. This is the duration for which messages are retained within the topic.
- Choose the compression type.
- Click Create.
Results
maprcli
command. The
command is provided for general reference. For more information, see maprcli Commands in This Guide.