Kafka connector

Reference: the kafka: block

Every forwarded Apache Kafka property the connector accepts, with types, defaults and bounds - plus the three lists of properties it refuses, and the capabilities no Kafka client can configure from a file.

Apache Kafka's own property names, forwarded. This is the half of the connector configuration your existing client.properties knowledge transfers to. Duraton's own keys are in the duraton: reference.

Values are parsed by declared type rather than guessed, so a number written as a string parses the same way. Enum values are case-insensitive. Every bound below is enforced at startup, not at connect time. Why an unknown name is fatal is What the connector refuses.

Connection

PropertyTypeDefaultBounds and notes
bootstrap.serverslist-Required. A host with no port gets :9092.
client.idstringduraton-kafka-ingressAt most 256 bytes.
client.rackstring-At most 512 bytes.
request.timeout.msmilliseconds10000100 to 900000.
socket.connection.setup.timeout.msmilliseconds10000At least 1.
connections.max.idle.msmilliseconds30000100 to 900000.
metadata.max.age.msmilliseconds3000005000 to 3600000.
retry.backoff.msmilliseconds100At least 1, and no more than retry.backoff.max.ms.
retry.backoff.max.msmilliseconds1000At least 1.
receive.message.max.bytesbytes1048576001024 to 1073741824.
allow.auto.create.topicsbooleanfalseKafka defaults this on. A forwarder that creates a topic from a misspelling is worse than one that refuses to start.
enable.metrics.pushbooleantrue

Consuming

PropertyTypeDefaultBounds and notes
auto.offset.resetenumrequiredearliest, latest, none. Also accepts smallest and beginning for earliest, largest and end for latest, and error for none.
isolation.levelenumread_committedread_committed, read_uncommitted. Kafka defaults to uncommitted; a forwarder cannot take back an event emitted from a transaction that later aborts.
check.crcsbooleantrue
fetch.min.bytesbytes1At least 1.
fetch.max.bytesbytes52428800No more than receive.message.max.bytes.
fetch.max.wait.msmilliseconds500At least 10.
max.partition.fetch.bytesbytes1048576No more than fetch.max.bytes. The combination is refused rather than quietly lowered.
max.poll.recordsinteger500At least 1. Also checked against max.poll.interval.ms.

Group membership

PropertyTypeDefaultBounds and notes
group.idstring-Required unless duraton.assign is set, and mutually exclusive with it.
group.instance.idstringunsetNon-empty when present. Omit it to join as a dynamic member.
partition.assignment.strategyenumcooperative-stickycooperative-sticky, sticky, range, roundrobin. A Java class name is refused with the short equivalent named.
session.timeout.msmilliseconds45000100 to 2147483647.
heartbeat.interval.msmilliseconds3000At most a third of session.timeout.ms.
max.poll.interval.msmilliseconds300000100 to 2147483647.

Security

PropertyTypeDefaultNotes
security.protocolenumPLAINTEXTPLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL. A SASL_* value requires sasl.mechanism.
sasl.mechanismenum-PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, OAUTHBEARER.
sasl.usernamestring-Required for PLAIN and both SCRAM mechanisms.
sasl.passwordsecret-Never in the file.
sasl.password.filefile path-
sasl.oauthbearer.token.endpoint.urlstring-OAUTHBEARER only.
sasl.oauthbearer.client.credentials.client.idstring-OAUTHBEARER only.
sasl.oauthbearer.client.credentials.client.secretsecret-Never in the file. OAUTHBEARER only.
sasl.oauthbearer.client.credentials.client.secret.filefile path-
sasl.oauthbearer.scopestring-OAUTHBEARER only.
sasl.oauthbearer.extensionslist of key=value-OAUTHBEARER only.

The TLS properties are in TLS and mTLS.

Alternative spellings

Each resolves to one canonical name. Writing both with different values is an error.

AlternativeCanonical
metadata.broker.listbootstrap.servers
topic.metadata.refresh.interval.msmetadata.max.age.ms
fetch.wait.max.msfetch.max.wait.ms
fetch.message.max.bytesmax.partition.fetch.bytes
sasl.mechanismssasl.mechanism
sasl.oauthbearer.client.idsasl.oauthbearer.client.credentials.client.id
sasl.oauthbearer.client.secretsasl.oauthbearer.client.credentials.client.secret
socket.receive.buffer.bytesreceive.buffer.bytes (itself unsupported, below)
socket.send.buffer.bytessend.buffer.bytes (itself unsupported, below)

Refused because they would break durability

Three, and only three. A property is controlled only where the connector's own correctness depends on it - never because a different value is merely preferred.

PropertyWhy
enable.auto.commitOffsets would advance on a timer whether or not Duraton accepted the record, so a crash would silently drop events. The committed offset is the connector's only durability record. Writing false is accepted and changes nothing.
auto.commit.interval.msAutomatic commits are off, so there is no interval to set. Use duraton.commit.interval for how long an accepted record waits before its offset is committed.
enable.auto.offset.storeAutomatic commits are off, so a stored offset would never be committed. Offsets are stored explicitly once a record has been accepted. Unlike enable.auto.commit, no value is accepted here.

Deliberately not controlled: session.timeout.ms, heartbeat.interval.ms, every fetch.*, isolation.level, check.crcs, allow.auto.create.topics. Each has a default the connector chose and can defend, and each is yours to override.

Refused because they cannot be honoured outside a JVM

The value is a Java class name, a Java keystore, or a login-module grammar, and there is no class loader.

PropertyThe alternative
sasl.jaas.configsasl.username and sasl.password, or the OAUTHBEARER properties.
ssl.truststore.location, ssl.truststore.password, ssl.truststore.type, ssl.truststore.certificatesssl.ca.location or ssl.ca.pem.
ssl.keystore.location, ssl.keystore.password, ssl.keystore.type, ssl.keystore.key, ssl.keystore.certificate.chainssl.certificate.location and ssl.key.location, or ssl.certificate.pem and ssl.key.pem.
ssl.engine.factory.class, ssl.keymanager.algorithm, ssl.trustmanager.algorithm, ssl.secure.random.implementation, ssl.providerThe ssl.* properties the connector does accept.
sasl.client.callback.handler.class, sasl.login.callback.handler.class, sasl.login.classThe OAUTHBEARER token provider in the duraton: block.
interceptor.classes, metric.reporters, config.providersNone: these are Java class names.

sasl.mechanism: GSSAPI and sasl.mechanism: AWS_MSK_IAM are refused for the same family of reasons, each with its own message.

Refused because this connector cannot honour them

PropertyWhy
group.protocolThis connector does not select the consumer rebalance protocol.
ssl.key.passwordEncrypted private keys are not supported: the encryption scheme those files use is deprecated as insecure. Use an unencrypted key file protected by filesystem permissions.
ssl.cipher.suitesThe same property name carries OpenSSL cipher grammar in one Kafka client and Java suite names in another, and neither maps onto the suites this connector negotiates. Accepting it would silently mean something other than what was written.
queued.min.messages, queued.max.messages.kbytes, fetch.queue.backoff.msThere is no local prefetch queue to bound. The equivalent memory bound is fetch.max.bytes multiplied by the number of brokers.
client.dns.lookupHost names are resolved by the platform resolver, which offers no equivalent switch.
default.api.timeout.ms, socket.timeout.msOne request-deadline setting rather than three: use request.timeout.ms.
reconnect.backoff.ms, reconnect.backoff.max.msOne backoff covers retries and reconnects: use retry.backoff.ms and retry.backoff.max.ms.
retriesA producer property in both Kafka vocabularies. The one record this connector ever writes is not separately tunable, and its consumer-side retry budget has no Kafka property, so nothing is lost.
metadata.recovery.strategy, metadata.recovery.rebootstrap.trigger.msSeed brokers are already re-queried periodically, and the rebootstrap hook is a callback rather than a setting.
receive.buffer.bytes, send.buffer.bytesSocket buffer sizes are not exposed; the platform defaults apply.
max.in.flight.requests.per.connectionConsumer fetches are already limited to one in flight per broker.
exclude.internal.topicsInternal topics are never matched by a pattern subscription here. Use duraton.excludeTopics.
enable.partition.eofAn end-of-partition signal has no meaning for a forwarder that never stops at the end of the log.
api.version.request, api.version.fallback.ms, broker.version.fallbackAll three are deprecated upstream and cover brokers older than 0.10.0. Broker API versions are negotiated automatically.
share.acknowledgement.mode, share.acquire.modeShare groups are deferred: their queue semantics overlap with what Duraton itself provides.
sasl.kerberos.service.name, sasl.kerberos.principal, sasl.kerberos.keytabGSSAPI is not built in this release, so its Kerberos settings have nothing to configure.

Beyond passthrough

Some client capabilities take a function or an interface, and no Kafka client can configure them from a file - the Java equivalents are class names a JVM class loader resolves. This is the honest edge of "forwarding", so it is written down rather than left to be discovered.

CapabilityWhat the connector offers instead
Custom connection diallerrequest.timeout.ms, socket.connection.setup.timeout.ms and the ssl.* properties.
Logger, context, hooks, buffer poolsBound internally. Logging is configured in the duraton: block.
Retry backoff and retry timeout functionsSynthesised from retry.backoff.ms and retry.backoff.max.ms.
Rebootstrap hookSeed brokers backed by DNS are re-resolved on reconnect.
Broker-pushed metrics callbackenable.metrics.push controls whether they are sent at all.
Preferring the laggiest partitionsNo declarative equivalent. Can be added on request.
Custom decompressorNone needed: none, gzip, snappy, lz4 and zstd are built in, which is every codec Kafka defines.
Adjusting fetch offsets at assignmentNo equivalent in this release.
Rebalance and offset callbacksBound internally to drain and commit before partitions are revoked, and surfaced as metrics and log events.
Auto-commit callbackNot applicable: automatic commits are off.
Share-group acknowledgement callbackNot applicable: share groups are off.
A TLS configuration objectSynthesised from the ssl.* properties.

Next

On this page