Optional. Configurations for the topic that are overridden from the cluster
defaults. The key of the map is a Kafka topic property name, for example:
cleanup.policy, compression.type.
Optional. Configurations for the topic that are overridden from the cluster
defaults. The key of the map is a Kafka topic property name, for example:
cleanup.policy, compression.type.
Optional. Configurations for the topic that are overridden from the cluster
defaults. The key of the map is a Kafka topic property name, for example:
cleanup.policy, compression.type.
Optional. Configurations for the topic that are overridden from the cluster
defaults. The key of the map is a Kafka topic property name, for example:
cleanup.policy, compression.type.
Optional. Configurations for the topic that are overridden from the cluster
defaults. The key of the map is a Kafka topic property name, for example:
cleanup.policy, compression.type.
Identifier. The name of the topic. The topic segment is used when
connecting directly to the cluster. Structured like:
projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
Identifier. The name of the topic. The topic segment is used when
connecting directly to the cluster. Structured like:
projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
Required. The number of partitions this topic has. The partition count can
only be increased, not decreased. Please note that if partitions are
increased for a topic that has a key, the partitioning logic or the
ordering of the messages will be affected.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Interface TopicOrBuilder (0.28.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.28.0 (latest)](/java/docs/reference/google-cloud-managedkafka/latest/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.26.0](/java/docs/reference/google-cloud-managedkafka/0.26.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.24.0](/java/docs/reference/google-cloud-managedkafka/0.24.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.23.0](/java/docs/reference/google-cloud-managedkafka/0.23.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.20.0](/java/docs/reference/google-cloud-managedkafka/0.20.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.19.0](/java/docs/reference/google-cloud-managedkafka/0.19.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.18.0](/java/docs/reference/google-cloud-managedkafka/0.18.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.16.1](/java/docs/reference/google-cloud-managedkafka/0.16.1/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloud-managedkafka/0.15.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.14.0](/java/docs/reference/google-cloud-managedkafka/0.14.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.13.0](/java/docs/reference/google-cloud-managedkafka/0.13.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.12.0](/java/docs/reference/google-cloud-managedkafka/0.12.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.11.0](/java/docs/reference/google-cloud-managedkafka/0.11.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.10.0](/java/docs/reference/google-cloud-managedkafka/0.10.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.9.0](/java/docs/reference/google-cloud-managedkafka/0.9.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.8.0](/java/docs/reference/google-cloud-managedkafka/0.8.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.7.0](/java/docs/reference/google-cloud-managedkafka/0.7.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.5.0](/java/docs/reference/google-cloud-managedkafka/0.5.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.4.0](/java/docs/reference/google-cloud-managedkafka/0.4.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.3.0](/java/docs/reference/google-cloud-managedkafka/0.3.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.2.0](/java/docs/reference/google-cloud-managedkafka/0.2.0/com.google.cloud.managedkafka.v1.TopicOrBuilder)\n- [0.1.0](/java/docs/reference/google-cloud-managedkafka/0.1.0/com.google.cloud.managedkafka.v1.TopicOrBuilder) \n\n public interface TopicOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### containsConfigs(String key)\n\n public abstract boolean containsConfigs(String key)\n\nOptional. Configurations for the topic that are overridden from the cluster\ndefaults. The key of the map is a Kafka topic property name, for example:\n`cleanup.policy`, `compression.type`.\n\n`map\u003cstring, string\u003e configs = 4 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getConfigs() (deprecated)\n\n public abstract Map\u003cString,String\u003e getConfigs()\n\nUse [#getConfigsMap()](/java/docs/reference/google-cloud-managedkafka/latest/com.google.cloud.managedkafka.v1.TopicOrBuilder#com_google_cloud_managedkafka_v1_TopicOrBuilder_getConfigsMap__) instead.\n\n### getConfigsCount()\n\n public abstract int getConfigsCount()\n\nOptional. Configurations for the topic that are overridden from the cluster\ndefaults. The key of the map is a Kafka topic property name, for example:\n`cleanup.policy`, `compression.type`.\n\n`map\u003cstring, string\u003e configs = 4 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getConfigsMap()\n\n public abstract Map\u003cString,String\u003e getConfigsMap()\n\nOptional. Configurations for the topic that are overridden from the cluster\ndefaults. The key of the map is a Kafka topic property name, for example:\n`cleanup.policy`, `compression.type`.\n\n`map\u003cstring, string\u003e configs = 4 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getConfigsOrDefault(String key, String defaultValue)\n\n public abstract String getConfigsOrDefault(String key, String defaultValue)\n\nOptional. Configurations for the topic that are overridden from the cluster\ndefaults. The key of the map is a Kafka topic property name, for example:\n`cleanup.policy`, `compression.type`.\n\n`map\u003cstring, string\u003e configs = 4 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getConfigsOrThrow(String key)\n\n public abstract String getConfigsOrThrow(String key)\n\nOptional. Configurations for the topic that are overridden from the cluster\ndefaults. The key of the map is a Kafka topic property name, for example:\n`cleanup.policy`, `compression.type`.\n\n`map\u003cstring, string\u003e configs = 4 [(.google.api.field_behavior) = OPTIONAL];`\n\n### getName()\n\n public abstract String getName()\n\nIdentifier. The name of the topic. The `topic` segment is used when\nconnecting directly to the cluster. Structured like:\nprojects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}\n\n`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`\n\n### getNameBytes()\n\n public abstract ByteString getNameBytes()\n\nIdentifier. The name of the topic. The `topic` segment is used when\nconnecting directly to the cluster. Structured like:\nprojects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}\n\n`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`\n\n### getPartitionCount()\n\n public abstract int getPartitionCount()\n\nRequired. The number of partitions this topic has. The partition count can\nonly be increased, not decreased. Please note that if partitions are\nincreased for a topic that has a key, the partitioning logic or the\nordering of the messages will be affected.\n\n`int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED];`\n\n### getReplicationFactor()\n\n public abstract int getReplicationFactor()\n\nRequired. Immutable. The number of replicas of each partition. A\nreplication factor of 3 is recommended for high availability.\n\n`\nint32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];\n`"]]