KubeMQ
ConnectorsKafkaReference

Limits & Rules

The Kafka connector's numeric limits — 256 partitions per topic, the 1 MiB default message ceiling, connection and consumer-group caps, and offset retention.

Two kinds of limit apply to the connector: hard limits (fixed in code, not configurable — protecting the wire protocol and the channel-injectivity guarantees reference/topic-mapping depends on) and operator-configurable caps (the CONNECTORS_KAFKA_* settings that bound per-topic, per-request, and per-connection resource use). Both are listed here; the full field-by-field settings reference — including fields not covered by this page, like transaction timeouts and byte-rate quotas — lives at Configuration reference.

Hard limits (not configurable)

RuleValueEnforced at
Partitions per topic256, hard cap, increase-onlyCreateTopics / CreatePartitions
Message timestamp typeCreateTime onlyLogAppendTime is rejectedServer startup (config validation)

A violation of either rule is a config-time or admin-time rejection, never a silent clamp — see Notes on the trickier ones below.

Operator-configurable caps (CONNECTORS_KAFKA_*)

Server-side settings in [Connectors.Kafka]; env vars use the CONNECTORS_KAFKA_* prefix. Defaults and ceilings below are the connector's own floor/ceiling pair — an unset or non-positive value falls back to the default (there is no "unbounded" mode on any of these), and a value above the ceiling is rejected at server startup.

FieldEnv varDefaultCeilingWhat happens over the limit
MaxMessageBytesCONNECTORS_KAFKA_MAX_MESSAGE_BYTES1048576 (1 MiB)1073741824 (1 GiB)An over-size Produce record is rejected MESSAGE_TOO_LARGE — no Append is attempted
MaxConnectionsCONNECTORS_KAFKA_MAX_CONNECTIONS1000none (0 = unlimited)A new TCP connection at or over the cap is refused at accept — Kafka has no CONNECT frame to carry a wire-level error, so the client simply cannot connect
MaxGroupsCONNECTORS_KAFKA_MAX_GROUPS1000010000000An unseen group name over the cap is refused the retriable COORDINATOR_NOT_AVAILABLE at JoinGroup/OffsetCommit
MaxTopicsPerRequestCONNECTORS_KAFKA_MAX_TOPICS_PER_REQUEST100001000000An over-cap request closes the connection outright — a bounded, O(1) reject, never a per-topic-shaped response, enforced before authorization on Produce/Fetch/ListOffsets/OffsetForLeaderEpoch/Metadata/the admin topic APIs
MaxPartitionsPerRequestCONNECTORS_KAFKA_MAX_PARTITIONS_PER_REQUEST10000010000000Same as MaxTopicsPerRequest — the connection is closed, not answered
OffsetsRetentionMinutesCONNECTORS_KAFKA_OFFSETS_RETENTION_MINUTES10080 (7 days)52560000 (100 years)A committed consumer-group offset older than this is expired by the group reaper on its next sweep — not an error, a retention rule
ScramIterationsCONNECTORS_KAFKA_SCRAM_ITERATIONS40961000000Applies only at server boot (SCRAM verifier derivation) — an out-of-range value fails startup with a configuration error, not a runtime request

Fan-out caps are authorization-independent. MaxTopicsPerRequest and MaxPartitionsPerRequest are enforced at the dispatch layer before the authorization check and the handler — the cap holds even with authorization disabled, since a pre-auth flood of distinct topic or partition names in one frame is exactly the fan-out this guards against.

Notes on the trickier ones

  • 256 partitions is a hard ceiling with no override. CreateTopics with NumPartitions > 256 is rejected INVALID_PARTITIONS. CreatePartitions follows the same rule for growth: Count must strictly exceed the topic's current partition count — a same-count or lower Count is also rejected INVALID_PARTITIONS (never shrink, never no-op), and a Count above 256 is rejected the same way. A partition increase, once accepted, is durable and cannot be reversed. See Partitions & Ordering for the ordering consequences of growing partition count on an existing topic.
  • MaxMessageBytes's 1 GiB ceiling is a safety bound, not a recommendation. Kafka frames are length-prefixed by a 32-bit integer; the ceiling keeps MaxMessageBytes comfortably below the point where the frame-length arithmetic could wrap. Most deployments should raise the 1 MiB default modestly (a few MiB) rather than approach the ceiling.
  • Per-topic max.message.bytes is echo-only. DescribeConfigs and IncrementalAlterConfigs accept and reflect a topic-level max.message.bytes override, but enforcement always uses the broker-wide MaxMessageBytes above (default 1 MiB, operator-raisable up to the 1 GiB ceiling) — a topic config can never raise the enforced limit.
  • MaxConnections fails closed at the TCP layer, not the Kafka protocol layer. Because Kafka has no in-band "too many connections" response, a client at the cap sees a plain connection refusal — indistinguishable, on the wire, from the port being closed. Size MaxConnections for your real client fleet (each consumer, producer, and admin tool holds at least one connection) before relying on it as a guardrail.
  • OffsetsRetentionMinutes is a retention rule, not a request-time limit. Unlike the other rows, exceeding it produces no error at all — a consumer group's committed offset simply ages out and is treated as absent (falls back to auto.offset.reset) the next time that group is described or resumes.
  • ScramIterations only matters if you run SASL/SCRAM. It is read once, at connector construction, to derive each configured user's SCRAM verifier — raising it strengthens brute-force resistance at a one-time boot cost, never a per-authentication cost.

Was this page helpful?

On this page