feat: add bounded kafka ingestion pipeline
This commit is contained in:
28
src/core/config.py
Normal file
28
src/core/config.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from functools import lru_cache
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
kafka_bootstrap_servers: str = "localhost:19092"
|
||||
kafka_raw_topic: str = "cdr.raw"
|
||||
|
||||
api_queue_size: int = 10_000
|
||||
|
||||
kafka_delivery_timeout_seconds: float = 4.0
|
||||
kafka_message_timeout_ms: int = 3_000
|
||||
|
||||
kafka_linger_ms: int = 5
|
||||
kafka_batch_size: int = 131_072
|
||||
kafka_producer_max_messages: int = 100_000
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user