Module mz_kafka_util::client
source · Expand description
Helpers for working with Kafka’s client API.
Structs§
- The address of a Kafka broker.
- Rewrites a broker address.
- A
ClientContext
implementation that usestracing
instead oflog
macros. - Configurable timeouts for Kafka connections.
- A client context that supports rewriting broker addresses.
Enums§
- The error returned by
get_partitions
. - A structured error type for errors reported by librdkafka through its logs.
- Tunneling clients used for re-writing ports / hosts
Constants§
- A reasonable default timeout when fetching metadata or partitions.
- Default to true as they have no downsides https://github.com/confluentinc/librdkafka/issues/283.
- The interval we will fetch metadata from, unless overridden by the source.
- The timeout for reading records from the progress topic. Set to something slightly longer than the idle transaction timeout (60s) to wait out any stuck producers.
- The
rdkafka
default. - The
rdkafka
default. - A reasonable default timeout when refreshing topic metadata. This is configured at a source level.
- Increased from the rdkafka default
Functions§
- Build a new
rdkafka
ClientConfig
with itslog_level
set correctly based on the passed throughtracing::Level
. This level should be determined fortarget: "librdkafka"
. - A simpler version of
create_new_client_config
that defaults thelog_level
toINFO
and should only be used in tests. - Retrieve number of partitions for a given
topic
using the givenclient
Type Aliases§
- Id of a partition in a topic.