pub struct TopicConfig {
pub retention_ms: i64,
pub retention_bytes: i64,
pub segment_bytes: i64,
pub cleanup_policy: String,
pub compression_type: String,
pub min_insync_replicas: i32,
pub max_message_bytes: i64,
pub message_timestamp_enabled: bool,
pub message_timestamp_type: String,
pub idempotent_writes: bool,
pub flush_interval_ms: i64,
pub custom: BTreeMap<String, String>,
}Expand description
Topic configuration parameters
Fields§
§retention_ms: i64Retention time in milliseconds (1 hour to 10 years) Default: 604800000 (7 days)
retention_bytes: i64Retention size in bytes per partition (-1 for unlimited) Default: -1 (unlimited)
segment_bytes: i64Segment size in bytes (1MB to 10GB)
cleanup_policy: StringCleanup policy: “delete”, “compact”, or “delete,compact”
compression_type: StringCompression type: “none”, “gzip”, “snappy”, “lz4”, “zstd”
min_insync_replicas: i32Minimum number of in-sync replicas for writes (1-10)
max_message_bytes: i64Maximum message size in bytes (1KB to 100MB)
message_timestamp_enabled: boolWhether to enable message timestamps
message_timestamp_type: StringTimestamp type: “CreateTime” or “LogAppendTime”
idempotent_writes: boolWhether to enable idempotent writes
flush_interval_ms: i64Flush interval in milliseconds (0 for no scheduled flush)
custom: BTreeMap<String, String>Custom configuration key-value pairs
Trait Implementations§
Source§impl Clone for TopicConfig
impl Clone for TopicConfig
Source§fn clone(&self) -> TopicConfig
fn clone(&self) -> TopicConfig
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 TopicConfig
impl Debug for TopicConfig
Source§impl Default for TopicConfig
impl Default for TopicConfig
Source§fn default() -> TopicConfig
fn default() -> TopicConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TopicConfig
impl<'de> Deserialize<'de> for TopicConfig
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
Source§impl JsonSchema for TopicConfig
impl JsonSchema for TopicConfig
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for TopicConfig
impl Serialize for TopicConfig
Source§impl Validate for TopicConfig
impl Validate for TopicConfig
Source§impl<'v_a> ValidateArgs<'v_a> for TopicConfig
impl<'v_a> ValidateArgs<'v_a> for TopicConfig
Auto Trait Implementations§
impl Freeze for TopicConfig
impl RefUnwindSafe for TopicConfig
impl Send for TopicConfig
impl Sync for TopicConfig
impl Unpin for TopicConfig
impl UnwindSafe for TopicConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more