Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warning for allow.auto.create.topics with producer #3952

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -42,6 +42,8 @@ configuration property.
* Bundled zlib upgraded to version 1.2.13.
* Added `on_broker_state_change()` interceptor
* The C++ API no longer returns strings by const value, which enables better move optimization in callers.
* Setting `allow.auto.create.topics` will no longer give a warning if used by a producer, since that is an expected use case.
Improvement in documentation for this property.


## Fixes
Expand Down
2 changes: 1 addition & 1 deletion CONFIGURATION.md
Expand Up @@ -57,6 +57,7 @@ api.version.request | * | true, false | true
api.version.request.timeout.ms | * | 1 .. 300000 | 10000 | low | Timeout for broker API version requests. <br>*Type: integer*
api.version.fallback.ms | * | 0 .. 604800000 | 0 | medium | Dictates how long the `broker.version.fallback` fallback is used in the case the ApiVersionRequest fails. **NOTE**: The ApiVersionRequest is only issued when a new connection to the broker is made (such as after an upgrade). <br>*Type: integer*
broker.version.fallback | * | | 0.10.0 | medium | Older broker versions (before 0.10.0) provide no way for a client to query for supported protocol features (ApiVersionRequest, see `api.version.request`) making it impossible for the client to know what features it may use. As a workaround a user may set this property to the expected broker version and the client will automatically adjust its feature set accordingly if the ApiVersionRequest fails (or is disabled). The fallback broker version will be used for `api.version.fallback.ms`. Valid values are: 0.9.0, 0.8.2, 0.8.1, 0.8.0. Any other value >= 0.10, such as 0.10.2.1, enables ApiVersionRequests. <br>*Type: string*
allow.auto.create.topics | * | true, false | false | low | Allow automatic topic creation on the broker when subscribing to or assigning non-existent topics. The broker must also be configured with `auto.create.topics.enable=true` for this configuration to take effect. Note: the default value (true) for the producer is different from the default value (false) for the consumer. Further, the consumer default value is different from the Java consumer (true), and this property is not supported by the Java producer. Requires broker version >= 0.11.0.0, for older broker versions only the broker configuration applies. <br>*Type: boolean*
security.protocol | * | plaintext, ssl, sasl_plaintext, sasl_ssl | plaintext | high | Protocol used to communicate with brokers. <br>*Type: enum value*
ssl.cipher.suites | * | | | low | A cipher suite is a named combination of authentication, encryption, MAC and key exchange algorithm used to negotiate the security settings for a network connection using TLS or SSL network protocol. See manual page for `ciphers(1)` and `SSL_CTX_set_cipher_list(3). <br>*Type: string*
ssl.curves.list | * | | | low | The supported-curves extension in the TLS ClientHello message specifies the curves (standard/named, or 'explicit' GF(2^k) or GF(p)) the client is willing to have the server use. See manual page for `SSL_CTX_set1_curves_list(3)`. OpenSSL >= 1.0.2 required. <br>*Type: string*
Expand Down Expand Up @@ -128,7 +129,6 @@ rebalance_cb | C | |
offset_commit_cb | C | | | low | Offset commit result propagation callback. (set with rd_kafka_conf_set_offset_commit_cb()) <br>*Type: see dedicated API*
enable.partition.eof | C | true, false | false | low | Emit RD_KAFKA_RESP_ERR__PARTITION_EOF event whenever the consumer reaches the end of a partition. <br>*Type: boolean*
check.crcs | C | true, false | false | medium | Verify CRC32 of consumed messages, ensuring no on-the-wire or on-disk corruption to the messages occurred. This check comes at slightly increased CPU usage. <br>*Type: boolean*
allow.auto.create.topics | C | true, false | false | low | Allow automatic topic creation on the broker when subscribing to or assigning non-existent topics. The broker must also be configured with `auto.create.topics.enable=true` for this configuraiton to take effect. Note: The default value (false) is different from the Java consumer (true). Requires broker version >= 0.11.0.0, for older broker versions only the broker configuration applies. <br>*Type: boolean*
client.rack | * | | | low | A rack identifier for this client. This can be any string value which indicates where this client is physically located. It corresponds with the broker config `broker.rack`. <br>*Type: string*
transactional.id | P | | | high | Enables the transactional producer. The transactional.id is used to identify the same transactional producer instance across process restarts. It allows the producer to guarantee that transactions corresponding to earlier instances of the same producer have been finalized prior to starting any new transactions, and that any zombie instances are fenced off. If no transactional.id is provided, then the producer is limited to idempotent delivery (if enable.idempotence is set). Requires broker version >= 0.11.0. <br>*Type: string*
transaction.timeout.ms | P | 1000 .. 2147483647 | 60000 | medium | The maximum amount of time in milliseconds that the transaction coordinator will wait for a transaction status update from the producer before proactively aborting the ongoing transaction. If this value is larger than the `transaction.max.timeout.ms` setting in the broker, the init_transactions() call will fail with ERR_INVALID_TRANSACTION_TIMEOUT. The transaction timeout automatically adjusts `message.timeout.ms` and `socket.timeout.ms`, unless explicitly configured in which case they must not exceed the transaction timeout (`socket.timeout.ms` must be at least 100ms lower than `transaction.timeout.ms`). This is also the default timeout value if no timeout (-1) is supplied to the transactional API methods. <br>*Type: integer*
Expand Down
26 changes: 14 additions & 12 deletions src/rdkafka_conf.c
Expand Up @@ -732,6 +732,20 @@ static const struct rd_kafka_property rd_kafka_properties[] = {
"Any other value >= 0.10, such as 0.10.2.1, "
"enables ApiVersionRequests.",
.sdef = "0.10.0", .validate = rd_kafka_conf_validate_broker_version},
{_RK_GLOBAL, "allow.auto.create.topics", _RK_C_BOOL,
_RK(allow_auto_create_topics),
"Allow automatic topic creation on the broker when subscribing to "
"or assigning non-existent topics. "
"The broker must also be configured with "
"`auto.create.topics.enable=true` for this configuration to "
"take effect. "
"Note: the default value (true) for the producer is "
"different from the default value (false) for the consumer. "
"Further, the consumer default value is different from the Java "
"consumer (true), and this property is not supported by the Java "
"producer. Requires broker version >= 0.11.0.0, for older broker "
"versions only the broker configuration applies.",
0, 1, 0},

/* Security related global properties */
{_RK_GLOBAL | _RK_HIGH, "security.protocol", _RK_C_S2I,
Expand Down Expand Up @@ -1254,18 +1268,6 @@ static const struct rd_kafka_property rd_kafka_properties[] = {
"on-disk corruption to the messages occurred. This check comes "
"at slightly increased CPU usage.",
0, 1, 0},
{_RK_GLOBAL | _RK_CONSUMER, "allow.auto.create.topics", _RK_C_BOOL,
_RK(allow_auto_create_topics),
"Allow automatic topic creation on the broker when subscribing to "
"or assigning non-existent topics. "
"The broker must also be configured with "
"`auto.create.topics.enable=true` for this configuraiton to "
"take effect. "
"Note: The default value (false) is different from the "
"Java consumer (true). "
"Requires broker version >= 0.11.0.0, for older broker versions "
"only the broker configuration applies.",
0, 1, 0},
{_RK_GLOBAL, "client.rack", _RK_C_KSTR, _RK(client_rack),
"A rack identifier for this client. This can be any string value "
"which indicates where this client is physically located. It "
Expand Down