Download the PHP package ojbaeza/station without Composer
On this page you can find all versions of the php package ojbaeza/station. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ojbaeza/station
More information about ojbaeza/station
Files in ojbaeza/station
Package station
Short Description A comprehensive Laravel queue management package with multi-driver support (RabbitMQ, Redis, SQS, Beanstalkd, Kafka), job recovery, and real-time dashboard
License MIT
Homepage https://github.com/ojbaeza/station
Informations about the package station
Station
A Laravel Horizon alternative with multi-driver support and enhanced job recovery.
Station replaces Horizon as your queue management and monitoring layer. Your existing Laravel queue code works unchanged — the only difference is running php artisan station:work instead of php artisan horizon.
Station hooks into Laravel's queue event system to transparently track every job, batch, and workflow through a real-time dashboard.
Resources: Upgrade Guide
What Station Provides
- Multi-driver support — RabbitMQ, Redis, SQS, Beanstalkd, Kafka
- Seamless job tracking — Every
dispatch()call is recorded automatically - Batch monitoring — Real-time progress for
Bus::batch()with integer failure thresholds - Workflow engine — Multi-step DAG workflows with conditions, branching, and pause/resume
- Job recovery — Checkpointing for long-running jobs, stuck job detection, automatic recovery
- Real-time dashboard — Inertia.js + Vue 3 UI with 3-second auto-refresh
- Built-in observability — Prometheus metrics, health checks, multi-channel alerting (Slack, Discord, Teams, email, webhooks)
- Alerting — Configurable alert rules with multi-channel notifications (Slack, Discord, Teams, email, webhooks, log)
- Security — Job encryption, payload masking, audit logging, gate-based authorization
For a detailed comparison with Horizon, see Station vs Horizon.
Requirements
- PHP 8.3+ (8.4 recommended)
- Laravel 11.x or 12.x
- ext-pcntl, ext-posix
Driver-specific: ext-amqp (RabbitMQ), ext-redis or predis (Redis), aws/aws-sdk-php (SQS), pda/pheanstalk (Beanstalkd), ext-rdkafka (Kafka)
Dashboard: inertiajs/inertia-laravel (optional — required only for the web dashboard)
Installation
Set your queue connection in .env:
Start the supervisor:
Access the dashboard at /station.
Jobs
Standard Laravel dispatch is tracked automatically — no code changes needed:
Station also provides a fluent API with tags and priority:
Station records processing time, memory usage, attempts, wait time, and status for every job.
Batches
Station wraps Laravel's native Bus::batch() with enhanced tracking. Jobs must use the Batchable trait:
Create and monitor batches:
For details on the overlay table strategy and atomic counter tracking, see Batches Architecture.
Workflows
Simple Workflows
A DAG wrapper around Bus::batch() — define steps with dependencies, Station resolves execution order:
Steps with no dependencies between them run in parallel.
Full Workflow Engine
Persistent workflows with conditional steps, branching, and pause/resume:
Workflow instances are stored in the database with full state tracking, and can be paused, resumed, or cancelled from the dashboard.
For details on execution model, branching, and context propagation, see Workflows Architecture.
Workflows vs Laravel Bus
Station's workflow engine provides DAG orchestration beyond what Laravel's built-in Bus::batch() and Bus::chain() can express:
| Feature | Station Workflows | Bus::batch() | Bus::chain() |
|---|---|---|---|
| DAG dependencies | Yes | No | No (linear only) |
| Parallel execution | Yes (async) | Yes | No |
| Conditional steps | Yes (runtime) | No | No |
| Dynamic branching | Yes | No | No |
| Pause / Resume | Yes | No | No |
| Context passing between steps | Yes | No | No |
| Per-step status tracking | Yes | Batch-level only | No |
| Per-step retry / timeout | Yes (async) | Per-job | Per-job |
| Progress tracking | Yes (step %) | Yes (job count %) | No |
| Cancellation | Yes | Yes | Stops chain |
| Stuck step recovery | Yes | No | No |
| Persisted state | Yes (DB) | Yes (job_batches) | No |
Station workflows support both synchronous (Workflow::run()) and asynchronous (Workflow::runAsync()) execution. In async mode, each step is dispatched as a standard ShouldQueue job processed by Laravel workers, enabling true parallel execution across multiple workers. The orchestration layer (dependency resolution, conditional evaluation, context propagation) is where Station adds value on top of Laravel's primitives.
Job Recovery
Checkpointing
Long-running jobs can save progress and resume after failures:
Stuck Job Detection
Station detects hung jobs using weighted scoring (heartbeat, runtime, memory, process state) and can recover them automatically:
For details on scoring, strategies, and health checks, see Recovery System.
Artisan Commands
| Command | Description |
|---|---|
station:work |
Start the supervisor (manages multiple workers) |
station:status |
Show queue and worker status |
station:pause {queue} |
Pause processing for a specific queue |
station:resume {queue} |
Resume a paused queue |
station:terminate |
Gracefully stop all workers |
station:recover |
Detect and recover stuck jobs (--strategy, --threshold, --dry-run, --workflows) |
station:retry {id} |
Retry a failed job (--all for all) |
station:failed |
List failed jobs |
station:flush |
Delete all failed jobs |
station:prune |
Clean up old data |
station:health |
Run health checks |
station:install |
Install Station |
station:publish-supervisor |
Generate a Supervisor config file (--workers, --user, --path) |
station:alerts:check |
Evaluate alert rules and send notifications (--seed to seed from config) |
Dashboard
Real-time monitoring UI at /station with auto-refresh every 3 seconds:
- Overview — Job throughput, failure rate, average processing time, active workers
- Jobs — Paginated list with status/queue/class filters, retry and delete actions
- Failed Jobs — Exception details, retry individually or in bulk
- Batches — Progress bars, status tracking, cancel and retry
- Workflows — Definitions, running instances, step-by-step progress
- Monitoring — Queue depths, worker counts, throughput charts
- Metrics — Historical data with time range selection
Authorization
By default, the dashboard is accessible in local environment. In other environments, configure the authorization gate in config/station.php:
Then define the gate in your AuthServiceProvider:
API
Full REST API at /api/station/ (configurable) with Bearer token auth. See docs/openapi.yaml for the OpenAPI 3.1 specification.
Configuration
For the full configuration reference, see Configuration.
Documentation
For in-depth documentation, see the docs/ directory:
- Architecture — Internal architecture: jobs, batches, workflows, workers, recovery, metrics, database schema, Station vs Horizon
- Queue Drivers — Feature matrix, per-driver configs, known limitations
- Facades — All 7 facades with every public method
- Security & Resilience — API auth, encryption, masking, alerting, circuit breaker
- Configuration — Full config reference and environment variables
- Migrating from Horizon — Step-by-step migration guide and feature mapping
- API Reference — OpenAPI 3.1 specification
Development Setup
Station includes a Docker environment with all queue drivers pre-configured:
See docker/README.md for Docker environment details, and the Makefile for all available commands.
Contributing
We welcome contributions! Please see CONTRIBUTING.md for development setup, code style guidelines (PER-CS 3.0), and testing requirements (95% coverage).
Security
For security vulnerabilities, please see SECURITY.md. Do not report security issues via GitHub Issues.
License
Station is open-sourced software licensed under the MIT license.
All versions of station with dependencies
ext-pcntl Version *
ext-posix Version *
illuminate/bus Version ^11.0 || ^12.0
illuminate/contracts Version ^11.0 || ^12.0
illuminate/database Version ^11.0 || ^12.0
illuminate/queue Version ^11.0 || ^12.0
illuminate/support Version ^11.0 || ^12.0
ramsey/uuid Version ^4.7