Create, Edit, and Delete Topics in Confluent Cloud

This page provides the steps to create, edit, and delete Apache Kafka® topics in Confluent Cloud using the Cloud Console or the Confluent CLI. You can also list, create or delete topics with REST APIs.

The topics are grouped by cluster within each environment.

Important

When private networking is enabled, some Cloud Console components, including topic management, use cluster endpoints that are not publicly reachable. You must configure your network to route requests for these components over the private connection. For details, see Access Confluent Cloud Console with Private Networking for details.

Create a Topic

The following steps describe how to create a topic using the Cloud Console or Confluent CLI.

To see a list of the default, maximum, and minimum Kafka configuration settings in Confluent Cloud, see Manage Kafka Cluster and Topic Configuration Settings in Confluent Cloud.

Follow these steps to create a topic with the Cloud Console:

  1. If you have more than one environment, select an environment.

  2. Select a cluster.

  3. Click the Topics in the navigation menu. The Topics page appears.

  4. If there aren’t any topics created yet, click Create topic. Otherwise, click Add a topic.

    Create topic page Confluent Cloud
  5. Specify your topic details and click Create with defaults. For advanced topic settings, click Customize settings.

    Create topic with defaults page Confluent Cloud

Note

To create a topic with infinite storage, on the New Topic page, click Show advanced settings and choose Infinite for Retention time. This sets retention.ms to -1.

Edit a Topic

The following steps describe how to edit a topic using the Cloud Console or Confluent CLI. Not all topic parameters can be edited. See topic parameters for a list of parameters.

Follow these steps to update a topic with the Cloud Console:

  1. If you have more than one environment, select an environment.

  2. Select a cluster.

  3. Click the Topics from the navigation menu. The Topics page appears.

  4. Select the topic name link for the topic you want to modify.

    Topics page Confluent Cloud
  5. Select the Configuration tab and Edit settings.

    Edit topic settings access in Confluent Cloud
  6. Make your changes and click Save changes. By default, only the most commonly modified settings are shown. For advanced settings, click Switch to expert mode.

    Important

    Some topic configuration parameters are not configurable through this interface. These unmodifiable parameters display a lock symbol (lock) next to them. They cannot be changed in either default or expert mode.

    Edit topic settings in Confluent Cloud

Editable topic parameters

The following table lists default parameter values for custom topics. The table also includes minimum and maximum values where they are relevant, and whether the parameters are editable. To edit topic settings, see Edit a Topic.

Important

The following limitations apply to changing parameter values after a topic has been created:

  • The num.partitions value can only be increased and not decreased after a topic is created, and you must make the increase using the CLI or API.
  • All other editable settings can be changed after topic creation, but the limits that applied at topic creation still apply.
Parameter Name Default Editable More Info
cleanup.policy delete Yes See footnote [*]
compression.type producer No  
connection.failed.authentication.delay.ms 5000 No  
default.replication.factor 3 No  
delete.retention.ms 86400000 Yes Max: 63113904000
file.delete.delay.ms 60000 No  
flush.messages 9223372036854775807 No  
flush.ms 9223372036854775807 No  
group.max.session.timeout.ms 1200000 No  
index.interval.bytes 4096 No  
max.message.bytes (Dedicated) 2097164 Yes Max: 20971520
max.message.bytes (Standard, Basic) 2097164 Yes Max: 8388608
max.compaction.lag.ms 9223372036854775807 Yes Min: 604800000 (7 days)
message.downconversion.enable true No  
message.format.version 3.0-IV1 No  
message.timestamp.difference.max.ms 9223372036854775807 Yes  
message.timestamp.type CreateTime Yes  
min.cleanable.dirty.ratio 0.5 No  
min.compaction.lag.ms 0 Yes  
min.insync.replicas 2 Yes  
num.partitions 6 Yes, see Custom topic settings for all cluster types supported by Kafka REST API and Terraform Provider Limits vary, see: Confluent Cloud Cluster Types
offsets.retention.minutes 10080 No  
preallocate false No  
retention.bytes -1 Yes  
retention.ms 604800000 Yes Set to -1 for infinite storage
segment.bytes 104857600 Yes Min: 52428800 Max: 1073741824 (1 gibibyte)
segment.index.bytes 10485760 No  
segment.jitter.ms 0 No  
segment.ms 604800000 Yes Min: 14000000 (4 hours) [†]
unclean.leader.election.enable false No  
[*]You cannot directly change cleanup.policy from delete to compact, delete. To set cleanup.policy to compact, delete, you must first change from delete to compact, then change to compact, delete.
[†]You can set segment.ms to as low as 600000 (10 minutes) but the minimum 14000000 (4 hours) is still enforced.

Delete a Topic

When you request to delete a topic, the topic is marked for deletion. The topic is not deleted immediately unless it is devoid of data, such as a newly created topic. In the interim, you cannot recreate a topic with the same name as the topic being deleted until the original topic and its data is finished being deleted.

When a topic is deleted, it cannot be restored.

Follow these steps to delete a topic using the Cloud Console:

  1. If you have more than one environment, select an environment.
  2. Select a cluster.
  3. Click the Topics in the navigation menu. The Topics page appears.
  4. Choose the topic name link for the topic you want to delete, and then select the Configuration tab.
  5. Click *Delete topic.
  6. Confirm the topic deletion by typing the topic name and click Continue.