pub struct BrokerStorageConfig {
pub brokers: String,
pub topic: String,
pub replication_factor: u16,
pub partitions: u32,
pub tls: Option<BrokerTlsConfig>,
pub auth: Option<BrokerAuthConfig>,
pub connect_timeout_ms: u64,
pub bootstrap_timeout_ms: u64,
}Expand description
Configuration for broker-backed schema storage
Fields§
§brokers: StringBroker address(es) to connect to Format: “host:port” or “host1:port1,host2:port2” for multiple brokers
topic: StringTopic name for storing schemas (default: “_schemas”)
replication_factor: u16Replication factor for the schema topic (default: 3)
partitions: u32Number of partitions for the schema topic (default: 1) Note: Using 1 partition ensures global ordering for schema IDs
tls: Option<BrokerTlsConfig>TLS configuration for broker connection
auth: Option<BrokerAuthConfig>Authentication configuration
connect_timeout_ms: u64Connection timeout in milliseconds (default: 10000)
bootstrap_timeout_ms: u64Bootstrap timeout - how long to wait for initial schema load (default: 30000)
Implementations§
Source§impl BrokerStorageConfig
impl BrokerStorageConfig
Sourcepub fn new(brokers: impl Into<String>) -> Self
pub fn new(brokers: impl Into<String>) -> Self
Create broker storage config with default topic name
Sourcepub fn with_topic(self, topic: impl Into<String>) -> Self
pub fn with_topic(self, topic: impl Into<String>) -> Self
Set custom topic name
Sourcepub fn with_replication_factor(self, factor: u16) -> Self
pub fn with_replication_factor(self, factor: u16) -> Self
Set replication factor
Sourcepub fn with_tls(self, config: BrokerTlsConfig) -> Self
pub fn with_tls(self, config: BrokerTlsConfig) -> Self
Enable TLS
Sourcepub fn with_auth(self, config: BrokerAuthConfig) -> Self
pub fn with_auth(self, config: BrokerAuthConfig) -> Self
Set authentication
Trait Implementations§
Source§impl Clone for BrokerStorageConfig
impl Clone for BrokerStorageConfig
Source§fn clone(&self) -> BrokerStorageConfig
fn clone(&self) -> BrokerStorageConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BrokerStorageConfig
impl Debug for BrokerStorageConfig
Source§impl Default for BrokerStorageConfig
impl Default for BrokerStorageConfig
Source§impl<'de> Deserialize<'de> for BrokerStorageConfig
impl<'de> Deserialize<'de> for BrokerStorageConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BrokerStorageConfig
impl RefUnwindSafe for BrokerStorageConfig
impl Send for BrokerStorageConfig
impl Sync for BrokerStorageConfig
impl Unpin for BrokerStorageConfig
impl UnsafeUnpin for BrokerStorageConfig
impl UnwindSafe for BrokerStorageConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more