Skip to content

Commit 29a49f1

Browse files
authored
updated strong config (#645)
1 parent bb0ddbe commit 29a49f1

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

src/Confluent.Kafka/Config.cs

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ public SaslMechanismType? SaslMechanism
382382
public int? MessageCopyMaxBytes { get { return GetInt("message.copy.max.bytes"); } set { this.SetObject("message.copy.max.bytes", value); } }
383383

384384
/// <summary>
385-
/// Maximum Kafka protocol response message size. This serves as a safety precaution to avoid memory exhaustion in case of protocol hickups. This value is automatically adjusted upwards to be at least `fetch.max.bytes` + 512 to allow for protocol overhead.
385+
/// Maximum Kafka protocol response message size. This serves as a safety precaution to avoid memory exhaustion in case of protocol hickups. This value must be at least `fetch.max.bytes` + 512 to allow for protocol overhead; the value is adjusted automatically unless the configuration property is explicitly set.
386386
/// </summary>
387387
public int? ReceiveMessageMaxBytes { get { return GetInt("receive.message.max.bytes"); } set { this.SetObject("receive.message.max.bytes", value); } }
388388

@@ -432,7 +432,7 @@ public SaslMechanismType? SaslMechanism
432432
public int? SocketTimeoutMs { get { return GetInt("socket.timeout.ms"); } set { this.SetObject("socket.timeout.ms", value); } }
433433

434434
/// <summary>
435-
/// Maximum time a broker socket operation may block. A lower value improves responsiveness at the expense of slightly higher CPU usage. **Deprecated**
435+
/// **DEPRECATED** No longer used.
436436
/// </summary>
437437
public int? SocketBlockingMaxMs { get { return GetInt("socket.blocking.max.ms"); } set { this.SetObject("socket.blocking.max.ms", value); } }
438438

@@ -472,19 +472,29 @@ public SaslMechanismType? SaslMechanism
472472
public BrokerAddressFamilyType? BrokerAddressFamily { get { return (BrokerAddressFamilyType?)GetEnum(typeof(BrokerAddressFamilyType), "broker.address.family"); } set { this.SetObject("broker.address.family", value); } }
473473

474474
/// <summary>
475-
/// Throttle broker reconnection attempts by this value +-50%.
475+
/// When enabled the client will only connect to brokers it needs to communicate with. When disabled the client will maintain connections to all brokers in the cluster.
476+
/// </summary>
477+
public bool? EnableSparseConnections { get { return GetBool("enable.sparse.connections"); } set { this.SetObject("enable.sparse.connections", value); } }
478+
479+
/// <summary>
480+
/// **DEPRECATED** No longer used. See `reconnect.backoff.ms` and `reconnect.backoff.max.ms`.
476481
/// </summary>
477482
public int? ReconnectBackoffJitterMs { get { return GetInt("reconnect.backoff.jitter.ms"); } set { this.SetObject("reconnect.backoff.jitter.ms", value); } }
478483

479484
/// <summary>
480-
/// librdkafka statistics emit interval. The application also needs to register a stats callback using `rd_kafka_conf_set_stats_cb()`. The granularity is 1000ms. A value of 0 disables statistics.
485+
/// The initial time to wait before reconnecting to a broker after the connection has been closed. The time is increased exponentially until `reconnect.backoff.max.ms` is reached. -25% to +50% jitter is applied to each reconnect backoff. A value of 0 disables the backoff and reconnects immediately.
481486
/// </summary>
482-
public int? StatisticsIntervalMs { get { return GetInt("statistics.interval.ms"); } set { this.SetObject("statistics.interval.ms", value); } }
487+
public int? ReconnectBackoffMs { get { return GetInt("reconnect.backoff.ms"); } set { this.SetObject("reconnect.backoff.ms", value); } }
488+
489+
/// <summary>
490+
/// The maximum time to wait before reconnecting to a broker after the connection has been closed.
491+
/// </summary>
492+
public int? ReconnectBackoffMaxMs { get { return GetInt("reconnect.backoff.max.ms"); } set { this.SetObject("reconnect.backoff.max.ms", value); } }
483493

484494
/// <summary>
485-
/// Logging level (syslog(3) levels)
495+
/// librdkafka statistics emit interval. The application also needs to register a stats callback using `rd_kafka_conf_set_stats_cb()`. The granularity is 1000ms. A value of 0 disables statistics.
486496
/// </summary>
487-
public int? Log_Level { get { return GetInt("log_level"); } set { this.SetObject("log_level", value); } }
497+
public int? StatisticsIntervalMs { get { return GetInt("statistics.interval.ms"); } set { this.SetObject("statistics.interval.ms", value); } }
488498

489499
/// <summary>
490500
/// Disable spontaneous log_cb from internal librdkafka threads, instead enqueue log messages on queue set with `rd_kafka_set_log_queue()` and serve log callbacks or events through the standard poll APIs. **NOTE**: Log messages will linger in a temporary queue until the log queue has been set.
@@ -730,6 +740,16 @@ public ProducerConfig() {}
730740
/// </summary>
731741
public string DeliveryReportFields { get { return Get("dotnet.producer.delivery.report.fields"); } set { this.SetObject("dotnet.producer.delivery.report.fields", value.ToString()); } }
732742

743+
/// <summary>
744+
/// When set to `true`, the producer will ensure that messages are successfully produced exactly once and in the original produce order. The following configuration properties are adjusted automatically (if not modified by the user) when idempotence is enabled: `max.inflight.requests.per.connection=5` (must be <= 5), `retries=INT32_MAX` (must be > 0), `acks=all`, `queuing.strategy=fifo`. Producer instantation will fail if user-supplied configuration is incompatible.
745+
/// </summary>
746+
public bool? EnableIdempotence { get { return GetBool("enable.idempotence"); } set { this.SetObject("enable.idempotence", value); } }
747+
748+
/// <summary>
749+
/// When set to `true`, any error that could result in a gap in the produced message series when a batch of messages fails, will raise a fatal error (ERR__GAPLESS_GUARANTEE) and stop the producer. Requires `enable.idempotence=true`.
750+
/// </summary>
751+
public bool? EnableGaplessGuarantee { get { return GetBool("enable.gapless.guarantee"); } set { this.SetObject("enable.gapless.guarantee", value); } }
752+
733753
/// <summary>
734754
/// Maximum number of messages allowed on the producer queue.
735755
/// </summary>

0 commit comments

Comments
 (0)