Download the PHP package gurento/kafka-consumer-filament without Composer

On this page you can find all versions of the php package gurento/kafka-consumer-filament. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kafka-consumer-filament

Kafka Consumer Filament

Latest Version on Packagist Total Downloads Plumb score

A Filament admin panel for gurento/kafka-consumer — manage Kafka topic mappings, monitor consumer health, and replay failed messages without leaving your admin panel.

Sending messages too? Producing to Kafka has its own dedicated UI package: gurento/kafka-producer-filament. Install it alongside this package if you need both directions.

Features

Requirements

Dependency Version
PHP 8.2+
Laravel 11 / 12 / 13
Filament 4.x / 5.x
gurento/kafka-consumer ^2.1

Installation

1. Install the packages

This plugin is the UI layer for gurento/kafka-consumer, which does the actual consuming. Install both:

2. Set up gurento/kafka-consumer

Publish the config and migrations, then migrate:

This publishes migrations for both the consumer and producer sides of gurento/kafka-consumer (the producer tables are only relevant if you also install gurento/kafka-producer-filament or use the producer service directly):

Review config/kafka-consumer.php for defaults (consumer group, retry attempts, backoff, health thresholds). The consumer itself ships with a plug-and-play engine based on mateusjunges/laravel-kafka — make sure the rdkafka PHP extension is installed and your broker settings are configured in the host app's config/kafka.php.

Add your Kafka connection settings to .env:

3. Register the plugin

In your Filament panel provider:

That's it — a Kafka Topics resource appears in your panel's navigation.

4. Start consuming

Create a topic mapping in the UI, then run the consumer (as a daemon under Supervisor/systemd in production):

See the gurento/kafka-consumer README for command options (--topics, --group, --from-beginning, --stop-on-empty, --reconsume-failed), replay patterns, events, and custom engines.

Customization

Every presentation element is dynamic. Configure it fluently on the plugin — each setter accepts a plain value or a Closure:

Available options

Method Type Default Description
navigationLabel() string\|Closure Kafka Topics Sidebar navigation title
navigationIcon() string\|BackedEnum\|Closure heroicon-o-arrow-down-on-square Navigation icon
navigationGroup() string\|UnitEnum\|Closure System Navigation group
navigationSort() int\|Closure Filament default Sort order within the group
navigationBadge() bool\|Closure false Show pending-retry count as a badge
modelLabel() / pluralModelLabel() string\|Closure kafka topic(s) Record labels used across pages
slug() string\|Closure kafka-topics Resource URL slug
tablePollInterval() string\|null\|Closure 10s Table auto-refresh interval; null disables
modelOptions() array\|Closure app/Models scan Options for the target-model dropdown

All options are optional — KafkaConsumerPlugin::make() alone keeps the defaults above.

Creating a Topic Mapping

The create/edit form covers everything a topic needs to go from raw Kafka payload to an upserted Eloquent record — no code required.

Topic Configuration

Field Description
Kafka Topic The topic name to consume (e.g. HR_APP.LIVE.office), unique per row
Target Model Eloquent model to upsert into — searchable dropdown scanned from app/Models (override via modelOptions())
Upsert Key Model column used as the unique key for updateOrCreate (default id); if unmapped, read from the payload (office.code)
Exclude Payload Keys Payload keys to strip before mapping and logging (e.g. meta, owner.login_token, items.*.price)
Active Toggle whether the consumer processes this topic
Retry settings Max re-consume attempts, retry backoff (seconds), and health stale threshold — per topic, falling back to config when unset

Field Mapping (payload matching)

A repeater that maps payload fields to model columns — each row is one from → to pair:

Payload Field (from) Model Column (to)
uuid id
name name

Given {"uuid": "off-001", "name": "Accounting Office"}, the consumer writes id = off-001, name = Accounting Office and upserts by the configured upsert key. Unmapped fields are skipped, so mappings stay explicit and reviewable. Rows collapse to a readable uuid → id label.

Nested payloads. Use dots for nested objects and * for every item of a list:

Payload Field (from) Model Column (to) Result
office.name office_name "University Health Service"
funding.*.code funding_codes ["GAA", "IGF"] (use a JSON/array cast)

A literal top-level key containing a dot still wins. A path that doesn't exist is skipped; a path that resolves to null maps null.

Test mapping

On the edit page, Test mapping opens a modal with a sample payload (pre-filled from the topic's latest consumed message) and shows the upsert key, mapped attributes, and payload after excludes as you type. It uses the current, unsaved form values and never writes to the database.

Relation Syncs (relationships)

A repeater for syncing BelongsToMany relationships from nested arrays in the payload:

Field Description
Payload Key Path to the list in the payload (e.g. office_controller or office.controllers)
Model Relationship The relationship method on the target model
Related Model The related Eloquent model (searchable dropdown)
Lookup Key Field inside each payload item used to find the related record — auto-detects uuid then id when blank
Related Model Key Column on the related model to match against — defaults to its primary key

Example: with payload key office_controller and payload

the consumer looks up each employee by uuid and calls $office->office_controller()->sync([...]). Items whose related record doesn't exist yet are skipped.

Typical Workflow

  1. Open Kafka Topics in your panel.
  2. Create a topic mapping: topic name, target model, upsert key, field mappings, optional relation syncs.
  3. Run the consumer:

  4. Monitor counters, health, and logs in the resource (the table auto-refreshes).
  5. Re-consume failed messages from the row action or the logs relation manager when needed.

What It Registers

Security & Access

This package ships UI classes only — it does not impose authorization. Define policies/permissions in your host app to control who can:

Troubleshooting

Resource not visible — ensure the plugin is registered on the panel you're viewing, then run php artisan optimize:clear.

Class not found — confirm both packages are installed and run composer dump-autoload.

Customizations not applying — plugin options are read at runtime from the current panel; make sure you configure them on the same KafkaConsumerPlugin::make() instance passed to ->plugins([...]).

Changelog

See CHANGELOG.md for release history.

License

The MIT License (MIT). See LICENSE for details.


All versions of kafka-consumer-filament with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0|^5.0
illuminate/support Version ^11.0|^12.0|^13.0
gurento/kafka-consumer Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gurento/kafka-consumer-filament contains the following files

Loading the files please wait ...