Implement production-grade Kafka producers that reliably publish domain events with high performance, type safety, and comprehensive error handling. Covers msgspec serialization, confluent-kafka configuration, OpenTelemetry tracing, and anti-corruption layer patterns for translating domain models to message schemas.
Use when building event publishers that send domain events to Kafka topics with "implement Kafka producer", "publish events to Kafka", "send order events", or "create event publisher".
Do NOT use for consuming events (use kafka-consumer-implementation), testing with testcontainers (use kafka-integration-testing), or designing schemas (use kafka-schema-management).
msgspec シリアル化を使用したイベント ストリーミング用のタイプ セーフな Kafka プロデューサーを実装します。 ドメイン イベント (注文、トランザクションなど) をパブリッシュする非同期/待機プロデューサーを構築するときに使用します。 スキーマ検証、エラー処理、再試行ロジック、分散トレースを備えています。 プロデューサー構成、冪等書き込み、正常なシャットダウンを処理します。 ソース: dawiddutoit/custom-claude。