redpanda
Sends message data to Kafka brokers and waits for acknowledgement before propagating any acknowledgements back to the input.
Introduced in version 4.39.0.
If you intend to use multiple redpanda components in your data pipeline, which have a common set of credentials, consider using the redpanda_common input and output instead.
|
-
Common
-
Advanced
outputs:
label: ""
redpanda:
seed_brokers: [] # No default (optional)
topic: "" # No default (required)
key: "" # No default (optional)
partition: "" # No default (optional)
metadata:
include_prefixes: []
include_patterns: []
max_in_flight: 256
batching:
count: 0
byte_size: 0
period: ""
check: ""
processors: [] # No default (optional)
outputs:
label: ""
redpanda:
seed_brokers: [] # No default (optional)
client_id: redpanda-connect
tls:
enabled: false
skip_cert_verify: false
enable_renegotiation: false
root_cas: ""
root_cas_file: ""
client_certs: []
sasl: [] # No default (optional)
metadata_max_age: 1m
request_timeout_overhead: 10s
conn_idle_timeout: 20s
tcp:
connect_timeout: 0s
keep_alive:
idle: 15s
interval: 15s
count: 9
tcp_user_timeout: 0s
topic: "" # No default (required)
key: "" # No default (optional)
partition: "" # No default (optional)
metadata:
include_prefixes: []
include_patterns: []
timestamp_ms: "" # No default (optional)
max_in_flight: 256
batching:
count: 0
byte_size: 0
period: ""
check: ""
processors: [] # No default (optional)
inject_tracing_map: "" # No default (optional)
partitioner: "" # No default (optional)
idempotent_write: true
compression: "" # No default (optional)
allow_auto_topic_creation: true
timeout: 10s
max_message_bytes: 1MiB
broker_write_max_bytes: 100MiB
Fields
allow_auto_topic_creation
Enables topics to be auto created if they do not exist when fetching their metadata.
Type: bool
Default: true
batching
Optional explicit batching policy for the output. Note that when batches are formed at the input level they can be expanded by this policy, but not contracted. When consuming data from a Redpanda input it is recommended to tune batches from the input config via the max_yield_batch_bytes field, or the unordered_processing.batching field if appropriate.
Type: object
# Examples:
batching:
byte_size: 5000
count: 0
period: 1s
# ---
batching:
count: 10
period: 1s
# ---
batching:
check: this.contains("END BATCH")
count: 0
period: 1m
batching.byte_size
An amount of bytes at which the batch should be flushed. If 0 disables size based batching.
Type: int
Default: 0
batching.check
A Bloblang query that should return a boolean value indicating whether a message should end a batch.
Type: string
Default: ""
# Examples:
check: this.type == "end_of_transaction"
batching.count
A number of messages at which the batch should be flushed. If 0 disables count based batching.
Type: int
Default: 0
batching.period
A period in which an incomplete batch should be flushed regardless of its size.
Type: string
Default: ""
# Examples:
period: 1s
# ---
period: 1m
# ---
period: 500ms
batching.processors[]
A list of processors to apply to a batch as it is flushed. This allows you to aggregate and archive the batch however you see fit. Please note that all resulting messages are flushed as a single batch, therefore splitting the batch into smaller batches using these processors is a no-op.
Type: processor
# Examples:
processors:
- archive:
format: concatenate
# ---
processors:
- archive:
format: lines
# ---
processors:
- archive:
format: json_array
broker_write_max_bytes
The maximum number of bytes this output can write to a broker connection in a single write. This field corresponds to Kafka’s socket.request.max.bytes.
Type: string
Default: 100MiB
# Examples:
broker_write_max_bytes: 128MB
# ---
broker_write_max_bytes: 50mib
compression
Set an explicit compression type (optional). The default preference is to use snappy when the broker supports it. Otherwise, use none.
Type: string
Options: lz4, snappy, gzip, none, zstd
conn_idle_timeout
The maximum duration that connections can remain idle before they are automatically closed. This field accepts Go duration format strings such as 100ms, 1s, or 5s.
Type: string
Default: 20s
idempotent_write
Enable the idempotent write producer option. This requires the IDEMPOTENT_WRITE permission on CLUSTER. Disable this option if the IDEMPOTENT_WRITE permission is not available.
Type: bool
Default: true
inject_tracing_map
EXPERIMENTAL: A Bloblang mapping used to inject an object containing tracing propagation information into outbound messages. The specification of the injected fields will match the format used by the service wide tracer.
Requires version 3.45.0 or later.
Type: string
# Examples:
inject_tracing_map: meta = @.merge(this)
# ---
inject_tracing_map: root.meta.span = this
key
An optional key to populate for each message. This field supports interpolation functions.
Type: string
max_in_flight
The maximum number of messages to have in flight at a given time. Increase this number to improve throughput until performance plateaus.
Type: int
Default: 256
max_message_bytes
The maximum space (in bytes) that an individual message may use. Messages larger than this value are rejected. This field corresponds to Kafka’s max.message.bytes.
Type: string
Default: 1MiB
# Examples:
max_message_bytes: 100MB
# ---
max_message_bytes: 50mib
metadata
Configure which metadata values are added to messages as headers. This allows you to pass additional context information along with your messages.
Type: object
metadata.include_patterns[]
Provide a list of explicit metadata key regular expression (re2) patterns to match against.
Type: array
Default: []
# Examples:
include_patterns:
- .*
# ---
include_patterns:
- _timestamp_unix$
metadata.include_prefixes[]
Provide a list of explicit metadata key prefixes to match against.
Type: array
Default: []
# Examples:
include_prefixes:
- foo_
- bar_
# ---
include_prefixes:
- kafka_
# ---
include_prefixes:
- content-
metadata_max_age
The maximum period of time after which metadata is refreshed. This field accepts Go duration format strings such as 100ms, 1s, or 5s.
Lower values provide more responsive topic and partition discovery but may increase broker load. Higher values reduce broker queries but can delay detection of topology changes.
Type: string
Default: 1m
partition
Set a partition for each message (optional). This field is only relevant when the partitioner is set to manual.
This field supports interpolation functions.
You must provide an interpolation string that is a valid integer.
Type: string
# Examples:
partition: ${! meta("partition") }
partitioner
Override the default murmur2 hashing partitioner.
Type: string
| Option | Summary |
|---|---|
|
Chooses the least backed up partition (the partition with the fewest amount of buffered records). Partitions are selected per batch. |
|
Manually select a partition for each message, requires the field |
|
Kafka’s default hash algorithm that uses a 32-bit murmur2 hash of the key to compute which partition the record will be on. |
|
Round-robin’s messages through all available partitions. This algorithm has lower throughput and causes higher CPU load on brokers, but can be useful if you want to ensure an even distribution of records to partitions. |
request_timeout_overhead
Grants an additional buffer or overhead to requests that have timeout fields defined. This field is based on the behavior of Apache Kafka’s request.timeout.ms parameter, but with the option to extend the timeout deadline.
Type: string
Default: 10s
sasl[]
Specify one or more methods or mechanisms of SASL authentication, which are attempted in order. If the broker supports the first SASL mechanism, all connections use it. If the first mechanism fails, the client picks the first supported mechanism. If the broker does not support any client mechanisms, all connections fail.
Type: object
# Examples:
sasl:
- mechanism: SCRAM-SHA-512
password: bar
username: foo
sasl[].aws.credentials
Optional manual configuration of AWS credentials to use. More information can be found in Amazon Web Services.
Type: object
sasl[].aws.credentials.from_ec2_role
Use the credentials of a host EC2 machine configured to assume an IAM role associated with the instance.
Requires version 4.2.0 or later.
Type: bool
sasl[].aws.credentials.role_external_id
An external ID to provide when assuming a role.
Type: string
sasl[].aws.credentials.secret
The secret for the credentials being used.
|
This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Secrets. |
Type: string
sasl[].aws.credentials.token
The token for the credentials being used, required when using short term credentials.
Type: string
sasl[].aws.tcp.connect_timeout
Maximum amount of time a dial will wait for a connect to complete. Zero disables.
Type: string
Default: 0s
sasl[].aws.tcp.keep_alive.count
Maximum unanswered keep-alive probes before dropping the connection. Zero defaults to 9.
Type: int
Default: 9
sasl[].aws.tcp.keep_alive.idle
Duration the connection must be idle before sending the first keep-alive probe. Zero defaults to 15s. Negative values disable keep-alive probes.
Type: string
Default: 15s
sasl[].aws.tcp.keep_alive.interval
Duration between keep-alive probes. Zero defaults to 15s.
Type: string
Default: 15s
sasl[].aws.tcp.tcp_user_timeout
Maximum time to wait for acknowledgment of transmitted data before killing the connection. Linux-only (kernel 2.6.37+), ignored on other platforms. When enabled, keep_alive.idle must be greater than this value per RFC 5482. Zero disables.
Type: string
Default: 0s
sasl[].mechanism
The SASL mechanism to use.
Type: string
| Option | Summary |
|---|---|
|
AWS IAM based authentication as specified by the 'aws-msk-iam-auth' java library. |
|
OAuth Bearer based authentication. |
|
Plain text authentication. |
|
Redpanda Cloud Service Account authentication when running in Redpanda Cloud. |
|
SCRAM based authentication as specified in RFC5802. |
|
SCRAM based authentication as specified in RFC5802. |
|
Disable sasl authentication |
sasl[].password
A password to provide for PLAIN or SCRAM-* authentication.
|
This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Secrets. |
Type: string
Default: ""
sasl[].token
The token to use for a single session’s OAUTHBEARER authentication.
Type: string
Default: ""
seed_brokers[]
A list of broker addresses to connect to in order. Use commas to separate multiple addresses in a single list item. Optional when seed_brokers is configured in a top-level redpanda block.
Type: array
# Examples:
seed_brokers:
- "localhost:9092"
# ---
seed_brokers:
- "foo:9092"
- "bar:9092"
# ---
seed_brokers:
- "foo:9092,bar:9092"
tcp.connect_timeout
Maximum amount of time a dial will wait for a connect to complete. Zero disables.
Type: string
Default: 0s
tcp.keep_alive.count
Maximum unanswered keep-alive probes before dropping the connection. Zero defaults to 9.
Type: int
Default: 9
tcp.keep_alive.idle
Duration the connection must be idle before sending the first keep-alive probe. Zero defaults to 15s. Negative values disable keep-alive probes.
Type: string
Default: 15s
tcp.keep_alive.interval
Duration between keep-alive probes. Zero defaults to 15s.
Type: string
Default: 15s
tcp.tcp_user_timeout
Maximum time to wait for acknowledgment of transmitted data before killing the connection. Linux-only (kernel 2.6.37+), ignored on other platforms. When enabled, keep_alive.idle must be greater than this value per RFC 5482. Zero disables.
Type: string
Default: 0s
timeout
The maximum period of time to wait for message sends before abandoning the request and retrying.
Type: string
Default: 10s
timestamp_ms
Set a timestamp (in milliseconds) for each message (optional). When left empty, the current timestamp is used. This field supports interpolation functions.
Type: string
# Examples:
timestamp_ms: ${! timestamp_unix_milli() }
# ---
timestamp_ms: ${! metadata("kafka_timestamp_ms") }
tls
Configure Transport Layer Security (TLS) settings to secure network connections. This includes options for standard TLS as well as mutual TLS (mTLS) authentication where both client and server authenticate each other using certificates. Key configuration options include enabled to enable TLS, client_certs for mTLS authentication, root_cas/root_cas_file for custom certificate authorities, and skip_cert_verify for development environments.
Type: object
tls.client_certs[]
A list of client certificates for mutual TLS (mTLS) authentication. Configure this field to enable mTLS, authenticating the client to the server with these certificates.
You must set tls.enabled: true for the client certificates to take effect.
Certificate pairing rules: For each certificate item, provide either:
-
Inline PEM data using both
certandkeyor -
File paths using both
cert_fileandkey_file.
Mixing inline and file-based values within the same item is not supported.
Type: object
Default: []
# Examples:
client_certs:
- cert: foo
key: bar
# ---
client_certs:
- cert_file: ./example.pem
key_file: ./example.key
tls.client_certs[].key
A plain text certificate key to use.
|
This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Secrets. |
Type: string
Default: ""
tls.client_certs[].password
A plain text password for when the private key is password encrypted in PKCS#1 or PKCS#8 format. The obsolete pbeWithMD5AndDES-CBC algorithm is not supported for the PKCS#8 format.
Because the obsolete pbeWithMD5AndDES-CBC algorithm does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.
|
This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Secrets. |
Type: string
Default: ""
# Examples:
password: foo
# ---
password: ${KEY_PASSWORD}
tls.enable_renegotiation
Whether to allow the remote server to request renegotiation. Enable this option if you’re seeing the error message local error:
tls: no renegotiation.
Requires version 3.45.0 or later.
Type: bool
Default: false
tls.root_cas
Specify a root certificate authority to use (optional). This is a string that represents a certificate chain from the parent-trusted root certificate, through possible intermediate signing certificates, to the host certificate. Use either this field for inline certificate data or root_cas_file for file-based certificate loading.
|
This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Secrets. |
Type: string
Default: ""
# Examples:
root_cas: |-
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
tls.root_cas_file
Specify the path to a root certificate authority file (optional). This is a file, often with a .pem extension, which contains a certificate chain from the parent-trusted root certificate, through possible intermediate signing certificates, to the host certificate. Use either this field for file-based certificate loading or root_cas for inline certificate data.
Type: string
Default: ""
# Examples:
root_cas_file: ./root_cas.pem
tls.skip_cert_verify
Whether to skip server-side certificate verification. Set to true only for testing environments as this reduces security by disabling certificate validation. When using self-signed certificates or in development, this may be necessary, but should never be used in production. Consider using root_cas or root_cas_file to specify trusted certificates instead of disabling verification entirely.
Type: bool
Default: false