Crate kafka_remapper_core

Crate kafka_remapper_core 

Source
Expand description

Kafka Partition Remapper Core Library

This library provides the core functionality for a Kafka partition remapping proxy. It enables exposing a large number of virtual partitions to clients while using fewer physical partitions on the actual Kafka cluster, reducing per-partition costs.

§Architecture

The library is organized into several modules:

  • config - Configuration loading and validation
  • error - Domain-specific error types
  • remapper - Core partition/offset mapping logic
  • network - TCP listener and Kafka frame codec
  • broker - Backend Kafka broker connection pool
  • handlers - Kafka protocol request handlers
  • metrics - Prometheus metrics collection
  • tls - TLS/SSL support for secure connections

§Example

use kafka_remapper_core::config::ProxyConfig;

// Load configuration
let config = ProxyConfig::from_file("config.yaml")?;

// Start the proxy
// ...

Re-exports§

pub use auth::SaslAuthenticator;
pub use auth::SaslServer;
pub use auth::SaslSession;
pub use auth::SaslStepResult;
pub use broker::BrokerConnection;
pub use broker::BrokerPool;
pub use broker::BrokerStream;
pub use config::BrokerSaslConfig;
pub use config::BrokerTlsConfig;
pub use config::ProxyConfig;
pub use config::SaslMechanism;
pub use config::SecurityProtocol;
pub use error::AuthError;
pub use error::ConfigError;
pub use error::ProxyError;
pub use error::RemapError;
pub use error::Result;
pub use error::TlsError;
pub use tls::TlsConnector;
pub use tls::TlsServerAcceptor;

Modules§

auth
Client authentication module.
broker
Broker connection management.
config
Configuration types for the Kafka partition remapping proxy.
error
Domain error types for the Kafka partition remapping proxy.
handlers
Kafka protocol request handlers.
metrics
Metrics collection for the Kafka partition remapping proxy.
network
Network layer for the Kafka partition remapping proxy.
remapper
Partition remapping logic.
tls
TLS/SSL support for Kafka connections.