exoticca/kafka-transport
Kafka transport integration for Laravel/PHP applications, enabling messaging with Apache Kafka from your Laravel project.
Architecture fit
exoticcaengineering/kafka-transport remains a Laravel queue transport that maps the framework's queue abstraction (jobs, workers, retries, failed_jobs, Horizon-adjacent tooling) onto Kafka. But 0.2.5 is not a tuning release — it changes the delivery contract of the transport. "Commit on receive and leave the group before handling" moves the offset commit to before the job executes and removes the worker from the consumer group for the duration of processing. That is an at-most-once posture: once a message is fetched, its offset is durable, so a crash, OOM kill, deploy restart, or timeout mid-handling loses the job. It also breaks the implicit assumption Laravel's queue API is built on — that a job not acknowledged is retried. release(), $tries, backoff, and retry-until-failed all depend on the message becoming redeliverable; this release removes that lever. Second-order effect: the cooperative-rebalancing capability that made 0.2.2 credible now applies to a much shorter membership window (fetch, then leave), so most of that scale-out upside evaporates, and group membership churn plausibly increases. For a TPM this is a scope change disguised as a changelog line, and it needs a product-level sign-off on durability, not a library bump.
Integration feasibility Composer-installable, but the integration gate has moved from environment verification to a semantic proof. Three things must be demonstrated in a spike before any adoption decision:
failed_jobs and whether retry on a failed job can re-produce it, given the offset is already committed.Technical risk
$tries, backoff, release(), and failed-job retry all assume at-least-once. If the transport cannot redeliver, retries become no-ops or throw — an unknown that must be tested, not inferred.group.initial.rebalance.delay.ms amplification — the exact failure class the 0.2.2 feature was meant to soothe.Key questions
failed_jobs, and can it be retried/re-produced? Does release() throw, no-op, or duplicate?max.poll.interval.ms implications?Stack fit
Laravel 9+/PHP 8.x with ext-rdkafka, containerized workers, Kafka 2.4+ (verify against actual constraints). 0.2.5 fits only workloads where losing an individual job is acceptable — metrics flushes, cache warmers, notification fan-out with its own retry, telemetry. It fits badly for financial postings, state transitions, email delivery with no upstream reconciliation, or anything the team currently trusts Laravel retries to make durable. The decision is per-queue, not per-application, and it should be documented as such.
Migration path
failed_jobs, and what rebalances.Compatibility
Treat 0.2.5 as an all-or-nothing cutover per consumer group, as before, but now for a different reason: mixing members means mixing commit-timing semantics within a group, which makes loss behavior non-deterministic and unobservable. Broker and librdkafka floors still need verification, and group.initial.rebalance.delay.ms plus session/heartbeat tuning need re-checking against the new membership churn profile — previous tuning is likely wrong.
Sequencing Verify 0.2.3/0.2.4 contents → confirm flag/default → durability spike with forced failures → stakeholder sign-off on at-most-once for named queues → queue classification → separate worker pools → canary on the lowest-value queue → monitor loss indicators for one full deploy cycle → expand or abandon. Rollback is not a redeploy: because committed offsets cannot be un-committed, "rollback" to 0.2.4 restores redelivery only for messages not yet received. Lost jobs are unrecoverable and must be reconciled from an upstream source of truth. That reconciliation path should exist before rollout, not after.
Maintenance
Code cost stays low; governance cost rises sharply. You now own a documented decision about which jobs may be lost, and that decision must be revisited whenever a new job class is added to an affected queue — an ongoing, easy-to-forget obligation. Version pinning is still mandatory, librdkafka revalidation continues, and the single-contributor concentration on delivery-path code is now a bigger liability than before, since a fork or vendor patch would touch commit semantics rather than configuration.
Support
No vendor, no LTS. On-call must now handle a failure mode Laravel teams are not trained for: absence of a job. Existing Laravel reflexes — check failed_jobs, retry, replay the queue — will not work. The runbook needs a "missing job" procedure with an upstream reconciliation source, plus explicit escalation for rebalance churn under the new leave/rejoin pattern. The team should also maintain a pinned known-good version and a tested revert.
Scaling
The 0.2.2 upside is largely neutralized. Cooperative rebalancing mainly helps when consumers hold partitions during long work; leaving the group before handling means the worker is a member only while fetching, so assignment churn happens more often and matters less per event. Throughput is now dominated by fetch/commit round-trips and group join cost rather than job duration, and long-running jobs no longer risk max.poll.interval.ms eviction — which is likely the motivation for the change, and a real benefit for slow jobs. Net: better for long, unreliable-duration jobs; worse for steady high-throughput queue workloads that relied on stable group membership.
Failure modes
failed_jobs entry by default. This is the dominant new risk.Ramp-up Higher than the 0.2.2 baseline. The Laravel wiring is still an afternoon, but the team must now internalize at-most-once reasoning: what "committed" means, why retries are a transport decision rather than a framework one, how to instrument for missing work (reconciliation counts, expected-vs-processed volume), and why partition ordering depends on holding assignment. Budget an enablement session, a written queue-classification doc, and a reconciliation runbook before any production use — and treat the missing 0.2.3/0.2.4 changelogs and absent migration guidance as documentation the team must backfill and maintain itself.
How can I help you explore Laravel packages today?