Skip to main content

redpanda

Consumes topic data from one or more Kafka brokers.

Reads records from one or more topics on a set of Kafka brokers. When a consumer group is specified the partitions of the configured topics are automatically distributed across consumers sharing that group, and offsets are committed and resumed under the group name. When a consumer group is not specified all partitions of the configured topics are consumed directly.

# Config fields, showing default values
input:
label: ""
redpanda:
seed_brokers: []
topics: []
regexp_topics: false
regexp_topics_include: []
regexp_topics_exclude: []
consumer_group: ""
client_id: redpanda-connect
rack_id: ""
instance_id: ""
tls:
enabled: false
skip_cert_verify: false
enable_renegotiation: false
root_cas: ""
root_cas_file: ""
client_certs: []
sasl: []
metadata_max_age: 1m
request_timeout_overhead: 10s
conn_idle_timeout: 20s
fetch_max_bytes: 50MiB
fetch_min_bytes: 1B
fetch_max_partition_bytes: 1MiB
fetch_max_wait: 5s
session_timeout: 1m
heartbeat_interval: 3s
rebalance_timeout: 45s
partition_buffer_bytes: 1MB
topic_lag_refresh_period: 5s
max_yield_batch_bytes: 32KB
commit_period: 5s
start_offset: earliest
start_from_oldest: false
transaction_isolation_level: read_uncommitted
extract_tracing_map: ""
auto_replay_nacks: true
timely_nacks_maximum_wait: ""
tcp:
connect_timeout: 0s
keep_alive:
count: 9
idle: 15s
interval: 15s
tcp_user_timeout: 0s
unordered_processing:
enabled: false
checkpoint_limit: 1024
batching:
count: 0
byte_size: 0
period: ""
check: ""
processors: []

Examples

Consume a topic as part of a consumer group so that partitions are balanced across all connected clients sharing the group.

input:
redpanda:
seed_brokers:
- localhost:9092
topics:
- orders
consumer_group: order-processors

Fields

seed_brokers

A list of broker addresses to connect to in order to establish connections. If an item of the list contains commas it will be expanded into multiple addresses.

Type: array
Default: []

topics

A list of topics to consume from. Multiple comma separated topics can be listed in a single element. When a consumer_group is specified partitions are automatically distributed across consumers of a topic, otherwise all partitions are consumed.

Type: array
Default: []

regexp_topics

Whether listed topics should be interpreted as regular expression patterns for matching multiple topics.

Type: bool
Default: false

regexp_topics_include

A list of regular expression patterns for matching topics to consume from. Topics that match any of these patterns are included.

Type: array
Default: []

regexp_topics_exclude

A list of regular expression patterns for excluding topics from consumption. Topics that match any of these patterns are excluded.

Type: array
Default: []

consumer_group

An optional consumer group to consume as. When specified the partitions of the configured topics are automatically distributed across consumers sharing the group, and partition offsets are automatically committed and resumed under this name.

Type: string
Default: ""

client_id

An identifier for the client connection.

Type: string
Default: "redpanda-connect"

rack_id

A rack identifier that specifies where the client is physically located, used for follower fetching.

Type: string
Default: ""

instance_id

An optional unique value used to register the consumer group member as a static member, which can reduce rebalances.

Type: string
Default: ""

tls

Custom TLS settings can be used to override system defaults.

Type: object

tls.enabled

Whether custom TLS settings are enabled.

Type: bool
Default: false

tls.skip_cert_verify

Whether to skip server side certificate verification.

Type: bool
Default: false

tls.enable_renegotiation

Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you're seeing the error message local error: tls: no renegotiation.

Type: bool
Default: false

tls.root_cas

An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate. :::warning Secret This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info. :::

Type: string
Default: ""

tls.root_cas_file

An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate.

Type: string
Default: ""

tls.client_certs

A list of client certificates to use. For each certificate either the fields cert and key, or cert_file and key_file should be specified, but not both.

Type: array
Default: []

tls.client_certs[].cert

A plain text certificate to use.

Type: string
Default: ""

tls.client_certs[].key

A plain text certificate key to use. :::warning Secret This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info. :::

Type: string
Default: ""

tls.client_certs[].cert_file

The path of a certificate to use.

Type: string
Default: ""

tls.client_certs[].key_file

The path of a certificate key to use.

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. Warning: Since it does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext. :::warning Secret This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info. :::

Type: string
Default: ""

sasl

Specify one or more methods of SASL authentication. SASL is tried in order; if the broker supports the first mechanism, all connections will use that mechanism. If the first mechanism fails, the client will pick the first supported mechanism. If the broker does not support any client mechanisms, connections will fail.

Type: array
Default: []

sasl[].mechanism

The SASL mechanism to use.

Type: string

OptionSummary
AWS_MSK_IAMAWS IAM based authentication as specified by the 'aws-msk-iam-auth' java library.
OAUTHBEAREROAuth Bearer based authentication.
PLAINPlain text authentication.
SCRAM-SHA-256SCRAM based authentication as specified in RFC5802.
SCRAM-SHA-512SCRAM based authentication as specified in RFC5802.
noneDisable sasl authentication

sasl[].username

A username to provide for PLAIN or SCRAM-* authentication.

Type: string
Default: ""

sasl[].password

A password to provide for PLAIN or SCRAM-* authentication. :::warning Secret This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info. :::

Type: string
Default: ""

sasl[].token

The token to use for a single session's OAUTHBEARER authentication.

Type: string
Default: ""

sasl[].extensions

Key/value pairs to add to OAUTHBEARER authentication requests.

Type: object

sasl[].aws

Contains AWS specific fields for when the mechanism is set to AWS_MSK_IAM.

Type: object

sasl[].aws.region

The AWS region to target.

Type: string
Default: ""

sasl[].aws.endpoint

Allows you to specify a custom endpoint for the AWS API.

Type: string
Default: ""

sasl[].aws.credentials

Optional manual configuration of AWS credentials to use. More information can be found in this document.

Type: object

sasl[].aws.credentials.profile

A profile from ~/.aws/credentials to use.

Type: string
Default: ""

sasl[].aws.credentials.id

The ID of credentials to use.

Type: string
Default: ""

sasl[].aws.credentials.secret

The secret for the credentials being used. :::warning Secret This field contains sensitive information that usually shouldn't be added to a config directly, read our secrets page for more info. :::

Type: string
Default: ""

sasl[].aws.credentials.token

The token for the credentials being used, required when using short term credentials.

Type: string
Default: ""

sasl[].aws.credentials.from_ec2_role

Use the credentials of a host EC2 machine configured to assume an IAM role associated with the instance.

Type: bool
Default: false

sasl[].aws.credentials.role

A role ARN to assume.

Type: string
Default: ""

sasl[].aws.credentials.role_external_id

An external ID to provide when assuming a role.

Type: string
Default: ""

metadata_max_age

The maximum age of the client's cached metadata before it is refreshed to allow detection of new topics, partitions, and brokers.

Type: string
Default: "1m"

request_timeout_overhead

Additional overhead added to requests that carry their own timeout, allowing time for the request to be written and the response to be read.

Type: string
Default: "10s"

conn_idle_timeout

The maximum period of time a connection may remain idle before it is closed.

Type: string
Default: "20s"

fetch_max_bytes

The maximum number of bytes a broker will try to send during a fetch. Brokers may exceed this limit if the first record batch is larger than this value.

Type: string
Default: "50MiB"

fetch_min_bytes

The minimum number of bytes a broker will try to send during a fetch before responding.

Type: string
Default: "1B"

fetch_max_partition_bytes

The maximum number of bytes that will be consumed for a single partition in a fetch request.

Type: string
Default: "1MiB"

fetch_max_wait

The maximum period of time a broker will wait for a fetch response to reach the minimum number of bytes before returning.

Type: string
Default: "5s"

session_timeout

The maximum period of time allowed between heartbeats from a consumer group member before it is removed from the group.

Type: string
Default: "1m"

heartbeat_interval

How frequently a consumer group member sends heartbeats to the group coordinator.

Type: string
Default: "3s"

rebalance_timeout

The amount of time a consumer group member is allowed to complete work and rejoin the group after a rebalance begins.

Type: string
Default: "45s"

partition_buffer_bytes

The amount of memory used to buffer records for each consumed partition.

Type: string
Default: "1MB"

topic_lag_refresh_period

The period of time between each refresh of the calculated topic lag metrics.

Type: string
Default: "5s"

max_yield_batch_bytes

The maximum size in bytes of each batch of records yielded by the input.

Type: string
Default: "32KB"

commit_period

The period of time between each commit of the current partition offsets. Offsets are always committed during shutdown.

Type: string
Default: "5s"

start_offset

The offset from which to start consuming when no committed offset is available for a partition.

Type: string
Default: "earliest"

start_from_oldest

Determines whether to consume from the oldest available offset when no committed offset exists, otherwise messages are consumed from the latest offset. This field is superseded by start_offset.

Type: bool

transaction_isolation_level

The isolation level to use when consuming transactional messages. read_uncommitted returns all records, while read_committed returns only records from committed transactions.

Type: string
Default: "read_uncommitted"

extract_tracing_map

An optional Bloblang mapping used to extract distributed tracing propagation information from consumed messages. This field is experimental and may change outside of major version releases.

Type: string
Default: ""

auto_replay_nacks

Whether messages that are rejected (nacked) at the output level should be automatically replayed indefinitely, eventually resulting in back pressure if the cause of the rejections is persistent. If set to false these messages will instead be deleted. Disabling auto replays can greatly improve memory efficiency of high throughput streams as the original shape of the data can be discarded immediately upon consumption and mutation.

Type: bool
Default: true

timely_nacks_maximum_wait

An optional maximum period of time to wait for a message to be acknowledged before it is forcibly rejected. This field is experimental and may change outside of major version releases.

Type: string
Default: ""

tcp

Advanced options for the underlying TCP connections, including connection timeout and keep-alive settings.

Type: object

tcp.connect_timeout

The maximum amount of time to wait for a TCP connection to be established before giving up. A value of 0s disables the timeout.

Type: string
Default: "0s"

tcp.keep_alive

TCP keep-alive settings for the connection.

Type: object

tcp.keep_alive.count

The maximum number of keep-alive probes to send before dropping a connection.

Type: int
Default: 9

tcp.keep_alive.idle

The amount of time a connection must remain idle before the first keep-alive probe is sent.

Type: string
Default: "15s"

tcp.keep_alive.interval

The amount of time between keep-alive probes.

Type: string
Default: "15s"

tcp.tcp_user_timeout

The maximum amount of time transmitted data may remain unacknowledged before the connection is closed. A value of 0s disables it.

Type: string
Default: "0s"

unordered_processing

Allows messages within a partition to be processed in parallel rather than strictly in order.

Type: object

unordered_processing.enabled

Whether unordered processing is enabled.

Type: bool
Default: false

unordered_processing.checkpoint_limit

Determines how many messages of the same partition can be processed in parallel before applying back pressure.

Type: int
Default: 1024

unordered_processing.batching

Allows you to configure a batching policy that batches messages together before flushing them for processing.

Type: object

unordered_processing.batching.count

A number of messages at which the batch should be flushed. If 0 disables count based batching.

Type: int
Default: 0

unordered_processing.batching.byte_size

An amount of bytes at which the batch should be flushed. If 0 disables size based batching.

Type: int
Default: 0

unordered_processing.batching.period

A period in which an incomplete batch should be flushed regardless of its size.

Type: string
Default: ""

unordered_processing.batching.check

A Bloblang query that should return a boolean value indicating whether a message should end a batch.

Type: string
Default: ""

unordered_processing.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.

Type: array