Skip to content

TopicProps

Properties for defining a Topic.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-kafka-topic

Initializer

using AlibabaCloud.SDK.ROS.CDK.Kafka;
new TopicProps {
    object InstanceId,
    object Remark,
    object Topic,
    object CompactTopic = null,
    object Config = null,
    object LocalTopic = null,
    object MinInsyncReplicas = null,
    object PartitionNum = null,
    object ReplicationFactor = null,
    TagsProperty[] Tags = null
};

Properties

Name Type Description
InstanceId object Property instanceId: The ID of the Message Queue for Apache Kafka instance where the topic is located.
Remark object Property remark: The description of the topic.
Topic object Property topic: The name of the topic.
CompactTopic object Property compactTopic: The log cleanup policy for the topic.
Config object Property config: Supplementary configuration.
LocalTopic object Property localTopic: The storage engine of the topic.
MinInsyncReplicas object Property minInsyncReplicas: The minimum number of ISR sync replicas.
PartitionNum object Property partitionNum: The number of partitions in the topic.
ReplicationFactor object Property replicationFactor: The number of copies of the topic.
Tags TagsProperty[] Property tags: Tags to attach to instance.

InstanceIdRequired

public object InstanceId { get; set; }
  • Type: object

Property instanceId: The ID of the Message Queue for Apache Kafka instance where the topic is located.

You can call the GetInstanceList operation to query instances.


RemarkRequired

public object Remark { get; set; }
  • Type: object

Property remark: The description of the topic.

The value of this parameter must meet the following requirements: The value can only contain letters, digits, hyphens (-), and underscores (_). The value must be 3 to 64 characters in length.


TopicRequired

public object Topic { get; set; }
  • Type: object

Property topic: The name of the topic.

The value of this parameter must meet the following requirements: The name can only contain letters, digits, hyphens (-), and underscores (_). The name must be 3 to 64 characters in length, and will be automatically truncated if it contains more characters. The name cannot be modified after being created.


CompactTopicOptional

public object CompactTopic { get; set; }
  • Type: object

Property compactTopic: The log cleanup policy for the topic.

This parameter is available when the Local Storage mode is specified for the topic. Valid values: false: uses the default log cleanup policy. true: uses the Apache Kafka log compaction policy.


ConfigOptional

public object Config { get; set; }
  • Type: object

Property config: Supplementary configuration.

Currently supports Key as replications. Indicates the number of Topic copies, the value type is Integer, and the value limit is 1~3. This parameter can only be specified if the LocalTopic value is true. NOTE If replications is specified in this parameter, the specified ReplicationFactor parameter no longer takes effect.


LocalTopicOptional

public object LocalTopic { get; set; }
  • Type: object

Property localTopic: The storage engine of the topic.

Valid values: false: the Cloud Storage mode. true: the Local Storage mode.


MinInsyncReplicasOptional

public object MinInsyncReplicas { get; set; }
  • Type: object

Property minInsyncReplicas: The minimum number of ISR sync replicas.

This parameter can only be specified if the LocalTopic value is true. The value must be less than the number of Topic copies. The number of synchronous replicas is limited to 1~3.


PartitionNumOptional

public object PartitionNum { get; set; }
  • Type: object

Property partitionNum: The number of partitions in the topic.

Valid values: 1 to 48 We recommend that you set the number of partitions to a multiple of 6 to reduce the risk of data skew.Note:For special requirements,submit a ticket.


ReplicationFactorOptional

public object ReplicationFactor { get; set; }
  • Type: object

Property replicationFactor: The number of copies of the topic.

This parameter can only be specified if the LocalTopic value is true. The number of copies is limited to 1~3. Note When the number of replicas is 1, there is a risk of data loss. Please set it carefully.


TagsOptional

public TagsProperty[] Tags { get; set; }

Property tags: Tags to attach to instance.

Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.