重要
このページの日本語コンテンツは古くなっている可能性があります。最新の英語版コンテンツをご覧になるには、こちらをクリックしてください。
Confluent Cloud のクラスターとトピックの構成設定¶
このトピックでは、Confluent Cloud での Apache Kafka® クラスターとトピックのデフォルトの構成設定と、編集可能なトピック設定について説明します。Kafka のすべての構成について詳しくは、「Confluent Platform の構成リファレンス」を参照してください。
トピックとクラスターの設定を編集する場合は、以下にご注意ください。
- ベーシッククラスターまたはスタンダードクラスターでは、Confluent Cloud のクラスター設定を変更することはできません。ただし、トピックの作成後に一部のトピック構成を編集することはできます。編集可能なトピックの設定のリストについては、「すべてのクラスタータイプのカスタムのトピック設定」を参照してください。
- You can change some configuration settings on Dedicated clusters using the Kafka CLI or REST API. See 専用クラスターの設定の変更.
- 内部 Kafka トピックにはアクセスできないので、編集できません。たとえば、内部トピック
__consumer_offsets
にはアクセスできません。また、アクセスできないトピックは、パーティション制限とパーティション請求金額にカウントされません。マネージド型コネクターおよび ksqlDB によって作成されたトピックにはアクセスできます。
Confluent Cloud Console でのクラスター設定へのアクセス¶
Cloud Console でクラスターの設定にアクセスできます。
次の手順に従います。
Confluent アカウントにサインインします。
環境とクラスターを選択します。
In the navigation menu, select Cluster Overview > Cluster settings and the Cluster settings page displays.
You can view the cloud type, provider, region, and zone availability details, and delete a cluster from the General tab.
Hover on the Cluster ID, Bootstrap server, or REST endpoint properties to access a copy-to-clipboard button for your convenience. Paste these details when you are configuring, running commands, or troubleshooting your cluster.
注釈
クラスターのタイプとその構成によっては、Networking タブと Security タブが表示される場合もあります。
すべてのクラスタータイプのカスタムのトピック設定¶
次の表は、カスタムトピックのパラメーターのデフォルト値のリストです。表には、最小値と最大値(該当する場合)、およびパラメーターが編集可能かどうかも示されています。トピック設定の編集については、「トピックの編集」を参照してください。
重要
トピックが作成された後のパラメーター値の変更には、以下の制限が適用されます。
- トピックが作成された後に、
cleanup.policy
をdelete
からcompact
に変更することはできません。 num.partitions
値は、トピックが作成された後に増やすことはできますが減らすことはできません。- 編集可能なその他すべての設定は、トピックの作成後も変更できます。ただし、トピックの作成時に適用された制限は引き続き適用されます。
パラメーター名 | デフォルト | 編集可能 | 最大/最小 |
---|---|---|---|
cleanup.policy | Delete | × | |
compression.type | producer | × | |
connection.failed.authentication.delay.ms | 5000 | × | |
default.replication.factor | 3 | × | |
delete.retention.ms | 86400000 | ○ | 最大: 63113904000 |
file.delete.delay.ms | 60000 | × | |
flush.messages | 9223372036854775807 | × | |
flush.ms | 9223372036854775807 | × | |
group.max.session.timeout.ms | 1200000 | × | |
index.interval.bytes | 4096 | × | |
max.message.bytes(専用) | 2097164 | ○ | 最大: 20971520 |
max.message.bytes(スタンダード、ベーシック) | 2097164 | ○ | 最大: 8388608 |
max.compaction.lag.ms | 9223372036854775807 | ○ | 最小: 604800000 |
message.downconversion.enable | true | × | |
message.format.version | 2.3-IV1 | × | |
message.timestamp.difference.max.ms | 9223372036854775807 | ○ | |
message.timestamp.type | CreateTime | ○ | |
min.cleanable.dirty.ratio | 0.5 | × | |
min.compaction.lag.ms | 0 | ○ | |
min.insync.replicas | 2 | ○ | |
num.partitions | 6 | ○(「パーティションを増やす」を参照) | 場合によって異なる(「クラスタータイプごとの Confluent Cloud の機能と制限」を参照) |
offsets.retention.minutes | 10080 | × | |
preallocate | false | × | |
retention.bytes | -1 | ○ | |
retention.ms | 604800000 | ○ | |
segment.index.bytes | 104857600 | ○ | 最小: 52428800 最大: 1073741824 |
segment.index.bytes | 10485760 | × | |
segment.jitter.ms | 0 | × | |
segment.ms | 604800000 | ○ | Min: 14000000 (4 hours) |
unclean.leader.election.enable | false | × |
パーティションを増やす¶
すべてのクラスタータイプの既存のトピックのパーティション数(num.partitions
)をトピック単位で変更できます。パーティションの数を変更するには、次のコマンドを使用して、Kafka コマンドラインツール に含まれる kafka-topic
スクリプトを実行します(コマンドラインツールは Confluent Platform と一緒にインストールされます)。
bin/kafka-topics --bootstrap-server <hostname:port> --command-config <config_file> --alter --topic <topic_name> --partitions <number_partitions>``
重要
既存のトピックのパーティションの数を変更する方法は、前述した kafka-topic
スクリプトのみです。Confluent CLI または Confluent Cloud API を使用してパーティションの数を変更することはできません。
詳細については、Confluent サポートポータル にサインインし、"Confluent Cloud がホストするトピックでパーティション数を増やす方法" を検索してください。
専用クラスターの設定の変更¶
You can modify the following settings for Dedicated clusters:
- auto.create.topics.enable
- ssl.cipher.suites
- num.partitions
- log.cleaner.max.compaction.lag.ms
- log.retention.ms
To modify these settings, you can use the kafka-configs
script that
is a part of the
Kafka command line tools (installed as a part of Confluent Platform).
To use this script, you will need the bootstrap server for your cluster. See Confluent Cloud Console でのクラスター設定へのアクセス for how to
retrieve the bootstrap server in the Confluent Cloud Console.
Alternatively, you can use the Kafka REST APIs to change these settings. You will need the REST endpoint and the cluster ID for your cluster to make Kafka REST calls. If you don't know where to find these, see Find the REST endpoint address and cluster ID to access them in the Cloud Console. For more on how to use the REST APIs, see REST API Quick Start for Confluent Cloud Developers.
Changes to the settings are applied to your Confluent Cloud cluster without additional action on your part and are persistent until the setting is explicitly changed again.
重要
これらの設定は、専用クラスターにのみ適用されます。ベーシッククラスターとスタンダードクラスターでは変更することはできません。
トピックの自動作成の有効化¶
Automatic topic creation (auto.create.topics.enable
) is disabled (false
) by default to help prevent unexpected costs. The following commands show
how to enable it. For more on this property, see broker configurations.
bin/kafka-configs --bootstrap-server <bootstrap> --command-config <config-properties> --entity-type brokers --entity-default --alter --add-config auto.create.topics.enable=true
curl --location --request PUT 'https://<REST endpoint>/kafka/v3/clusters/<cluster-id>/broker-configs/auto.create.topics.enable' \
--header 'Authorization: Basic <base64-encoded-key-and-secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
"value": "true"
}'
暗号スイートの制限¶
The following commands show how to restrict the allowed TLS/SSL cipher suites (ssl.cipher.suites
).
For more on this property, see broker configurations.
bin/kafka-configs --bootstrap-server <bootstrap> --command-config config.properties --entity-type brokers --entity-default --alter --add-config ssl.cipher.suites=["list-item-1,list-item-2"]
curl --location --request PUT 'https://<REST endpoint>/kafka/v3/clusters/<cluster-id>/broker-configs/ssl.cipher.suites' \
--header 'Authorization: Basic <base64-encoded-key-and-secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
"value": "<int>"
}'
暗号の有効なリストは次のとおりです。
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
新しいトピックのデフォルトのパーティション数の変更¶
The following commands show how to set the default number of partitions (num.partitions
) for newly
created topics. For more on this property, see num.partitions
in the table in
the previous section.
bin/kafka-configs --bootstrap-server <bootstrap> --command-config <auth-configs> --entity-type brokers --entity-default --alter --add-config num.partitions=<int>
curl --location --request PUT 'https://<REST endpoint>/kafka/v3/clusters/<cluster-id>/broker-configs/num.partitions' \
--header 'Authorization: Basic <base64-encoded-key-and-secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
"value": "<int>"
}'
トピックが作成された後にパーティションの数を変更するには、「パーティションを増やす」を参照してください。
最大ログ圧縮時間の変更¶
The following commands show how to set the default maximum log compaction time (log.cleaner.max.compaction.lag.ms
) for new topics.
For more on this property, see topic configurations
and max.compaction.lag.ms
in the table in the previous section.
bin/kafka-configs --bootstrap-server <bootstrap> --command-config <auth-configs> --entity-type brokers --entity-default --alter --add-config log.cleaner.max.compaction.lag.ms=<int>
curl --location --request PUT 'https://<REST endpoint>/kafka/v3/clusters/<cluster-id>/broker-configs/log.cleaner.max.compaction.lag.ms' \
--header 'Authorization: Basic <base64-encoded-key-and-secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
"value": "<int>"
}'
ログ保存時間の変更¶
The following commands show how to set the default log retention time (log.retention.ms
) for new topics.
For more on this property, see topic configurations
and retention.ms
in the table in the previous section.
bin/kafka-configs --bootstrap-server <bootstrap> --command-config <auth-configs> --entity-type brokers --entity-default --alter --add-config log.retention.ms=<int>
curl --location --request PUT 'https://<REST endpoint>/kafka/v3/clusters/<cluster-id>/broker-configs/log.retention.ms' \
--header 'Authorization: Basic <base64-encoded-key-and-secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
"value": "<int>"
}'