idealo/php-rdkafka-ffi
Unmaintained Kafka client for PHP 7.4–8.0 using FFI bindings to librdkafka, compatible with php-rdkafka interfaces. Supports producer (transactions), consumer, admin client, mock cluster for tests, and callback-based error/log handling.
rdkafka extension (v5/6), offering a hybrid approach for teams weighing performance vs. maintainability.rdkafka (a battle-tested extension) while keeping the FFI-based fallback for environments where extensions are restricted.Adopt when:
rdkafka extensions (e.g., hybrid cloud/on-prem deployments).rdkafka’s performance without dropping FFI compatibility.Look elsewhere if:
php-rdkafka directly).laravel-queue with Redis/SQS may suffice.rdkafka (e.g., strict security policies); evaluate confluent-php-client instead.For Executives: *"This update makes Kafka integration future-proof for our PHP stack. By supporting PHP 8.3/8.4 and librdkafka 2.1+, we can:
rdkafka—giving us the best of both worlds: performance and flexibility.rdkafka compatibility here is a huge win for teams pushing high-volume Kafka workloads. Proposal: Pilot this for [X use case] alongside php-rdkafka to compare performance and maintenance overhead."For Engineering:
*"Key upgrades in v0.6.0:
✅ PHP 8.3/8.4 support – No more versioning conflicts with Laravel.
✅ Librdkafka 2.1–2.8 – Future-proof for Kafka cluster upgrades (e.g., new compression, batching).
✅ Fixed transaction errors – Critical for durable writes (e.g., financial events).
✅ Hybrid FFI/rdkafka – Use rdkafka for performance, fall back to FFI if needed.
Action items:
php-rdkafka for our [X] workload (e.g., 10K msg/sec throughput).rdkafka extension setup for CI/CD.FFI::new()) may affect custom wrappers—audit our codebase.
Proposal: Use this for [Y project] as the primary Kafka client, with php-rdkafka as a backup for performance-critical paths."*How can I help you explore Laravel packages today?