Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Rdkafka Ffi Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Modern PHP Stack Compatibility: Enables adoption in PHP 8.3/8.4 environments, aligning with Laravel’s long-term support (LTS) roadmap and reducing tech debt for teams upgrading.
  • RdKafka Integration: Bridges the gap between PHP’s native FFI-based Kafka clients and the high-performance rdkafka extension (v5/6), offering a hybrid approach for teams weighing performance vs. maintainability.
  • Librdkafka Version Flexibility: Supports librdkafka 2.1.x–2.8.x, future-proofing deployments against Kafka cluster upgrades (critical for enterprises or long-running projects).
  • Transaction Lifecycle Improvements: Fixes for native transaction error handling make this viable for financial systems, auditable logs, or ACID-compliant event sourcing where message durability is non-negotiable.
  • Build vs. Buy Revisited: Strengthens the case for avoiding custom Kafka integrations by reducing friction with rdkafka (a battle-tested extension) while keeping the FFI-based fallback for environments where extensions are restricted.
  • Roadmap Alignment: Supports Laravel’s event-driven initiatives (e.g., Horizon + Kafka, or replacing queues with Kafka for horizontal scaling) with reduced versioning risks.

When to Consider This Package

  • Adopt when:

    • You’re on PHP 8.3/8.4 and need a Kafka client that works with both FFI and rdkafka extensions (e.g., hybrid cloud/on-prem deployments).
    • Your project requires librdkafka 2.1+ (e.g., newer Kafka features like exactly-once semantics or dynamic topic creation).
    • You’re migrating from legacy queues (e.g., Beanstalkd, Redis) to Kafka and need transactional reliability (fixed in v0.6.0).
    • Your team uses Laravel + Kafka for background jobs, notifications, or ETL and wants to leverage rdkafka’s performance without dropping FFI compatibility.
    • You’re evaluating Kafka for high-throughput workloads (e.g., IoT, ad tech) where librdkafka’s tuning (compression, batching) is critical.
  • Look elsewhere if:

    • You require active maintenance (package is still archived; monitor for forks or consider php-rdkafka directly).
    • Your use case is simple pub/sub (e.g., low-volume notifications); laravel-queue with Redis/SQS may suffice.
    • You need Kafka Streams/KSQL (this remains a basic pub/sub client).
    • Your environment blocks both FFI and rdkafka (e.g., strict security policies); evaluate confluent-php-client instead.
    • You’re locked into librdkafka <2.1 (e.g., legacy Kafka clusters).

How to Pitch It (Stakeholders)

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:

  • Scale critical pipelines (e.g., payments, analytics) with transactional reliability (fixed in v0.6.0).
  • Reduce vendor lock-in by bridging FFI and rdkafka—giving us the best of both worlds: performance and flexibility.
  • Align with Laravel’s LTS roadmap without forcing a rewrite when we upgrade PHP. The tradeoff? We’ll still need to validate stability (it’s archived), but the 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:

  1. Benchmark: Compare this vs. php-rdkafka for our [X] workload (e.g., 10K msg/sec throughput).
  2. Risk mitigation:
    • Document rdkafka extension setup for CI/CD.
    • Test transaction rollback scenarios (e.g., failed producer commits).
  3. Deprecation note: The FFI static method changes (e.g., 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."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui