Skip to main content

AdminClientConfig

Struct AdminClientConfig 

Source
pub struct AdminClientConfig { /* private fields */ }
Expand description

Configuration for the admin client.

Corresponds to org.apache.kafka.clients.admin.AdminClientConfig. Unknown keys are accepted silently, matching Java’s AbstractConfig behavior.

Implementations§

Source§

impl AdminClientConfig

Source

pub const BOOTSTRAP_SERVERS_CONFIG: &'static str = "bootstrap.servers"

bootstrap.servers

Source

pub const BOOTSTRAP_CONTROLLERS_CONFIG: &'static str = "bootstrap.controllers"

bootstrap.controllers (KIP-919). Accepted and validated as in Java, but connecting through controllers is not implemented, so setting it makes Self::new fail (see there).

Source

pub const CLIENT_DNS_LOOKUP_CONFIG: &'static str = CommonClientConfigs::CLIENT_DNS_LOOKUP_CONFIG

Config key: client.dns.lookup. Java’s AdminClientConfig.java declares it as its own public alias of CommonClientConfigs.CLIENT_DNS_LOOKUP_CONFIG.

Source

pub const CLIENT_ID_CONFIG: &'static str = "client.id"

client.id

Source

pub const REQUEST_TIMEOUT_MS_CONFIG: &'static str = "request.timeout.ms"

request.timeout.ms

Source

pub const DEFAULT_API_TIMEOUT_MS_CONFIG: &'static str = "default.api.timeout.ms"

default.api.timeout.ms

Source

pub const RETRIES_CONFIG: &'static str = "retries"

retries

Source

pub const RETRY_BACKOFF_MS_CONFIG: &'static str = "retry.backoff.ms"

retry.backoff.ms

Source

pub const RETRY_BACKOFF_MAX_MS_CONFIG: &'static str = "retry.backoff.max.ms"

retry.backoff.max.ms

Source

pub const RECONNECT_BACKOFF_MS_CONFIG: &'static str = "reconnect.backoff.ms"

reconnect.backoff.ms

Source

pub const RECONNECT_BACKOFF_MAX_MS_CONFIG: &'static str = "reconnect.backoff.max.ms"

reconnect.backoff.max.ms

Source

pub const CONNECTIONS_MAX_IDLE_MS_CONFIG: &'static str = "connections.max.idle.ms"

connections.max.idle.ms

Source

pub const METADATA_MAX_AGE_MS_CONFIG: &'static str = "metadata.max.age.ms"

metadata.max.age.ms

Source

pub const SOCKET_CONNECTION_SETUP_TIMEOUT_MS_CONFIG: &'static str = "socket.connection.setup.timeout.ms"

socket.connection.setup.timeout.ms

Source

pub const SECURITY_PROTOCOL_CONFIG: &'static str = CommonClientConfigs::SECURITY_PROTOCOL_CONFIG

security.protocol

Source

pub const SASL_MECHANISM_CONFIG: &'static str = SaslConfigs::SASL_MECHANISM

sasl.mechanism

Source

pub const SASL_JAAS_CONFIG: &'static str = SaslConfigs::SASL_JAAS_CONFIG

sasl.jaas.config

Source

pub fn new(props: &HashMap<String, String>) -> Result<Self, Error>

Creates a config from a property map. bootstrap.servers must be non-empty.

§Errors

Returns Error::Config if bootstrap.servers is missing or empty, and an error if a value fails to parse or validate. Following Java’s AdminBootstrapAddresses.fromConfig, setting both bootstrap.servers and bootstrap.controllers is an Error::Config. Setting only bootstrap.controllers returns an UNSUPPORTED_VERSION error (Error::unsupported_version): Java accepts it (KIP-919), but this client does not implement bootstrapping through controllers, and silently ignoring the key would leave the client with no bootstrap address at all.

Source

pub fn bootstrap_servers(&self) -> &[String]

The bootstrap.servers list.

Source

pub fn client_id(&self) -> &str

The client.id.

Source

pub fn request_timeout_ms(&self) -> i32

request.timeout.ms.

Source

pub fn default_api_timeout_ms(&self) -> i32

default.api.timeout.ms.

Source

pub fn retries(&self) -> i32

retries.

Source

pub fn retry_backoff_ms(&self) -> i64

retry.backoff.ms.

Source

pub fn retry_backoff_max_ms(&self) -> i64

retry.backoff.max.ms.

Source

pub fn reconnect_backoff_ms(&self) -> i64

reconnect.backoff.ms.

Source

pub fn reconnect_backoff_max_ms(&self) -> i64

reconnect.backoff.max.ms.

Source

pub fn connections_max_idle_ms(&self) -> i64

connections.max.idle.ms.

Source

pub fn metadata_max_age_ms(&self) -> i64

metadata.max.age.ms.

Source

pub fn socket_connection_setup_timeout_ms(&self) -> i64

socket.connection.setup.timeout.ms.

Source

pub fn security_protocol(&self) -> SecurityProtocol

security.protocol.

Source

pub fn sasl_config(&self) -> &SaslConfigs

SASL configuration (mechanism, JAAS config, credentials).

Source

pub fn ssl_config(&self) -> &SslConfigs

SSL/TLS configuration.

Trait Implementations§

Source§

impl Clone for AdminClientConfig

Source§

fn clone(&self) -> AdminClientConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AdminClientConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AdminClientConfig

Source§

fn default() -> Self

Defaults match AdminClientConfig’s ConfigDef (Apache Kafka 4.2).

Source§

impl PartialEq for AdminClientConfig

Source§

fn eq(&self, other: &AdminClientConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for AdminClientConfig

Source§

impl StructuralPartialEq for AdminClientConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V