Download the PHP package ahmedessam/lararabbit without Composer
On this page you can find all versions of the php package ahmedessam/lararabbit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ahmedessam/lararabbit
More information about ahmedessam/lararabbit
Files in ahmedessam/lararabbit
Package lararabbit
Short Description A powerful and elegant RabbitMQ integration for Laravel applications, providing a simple and efficient way to manage message queues and event-driven architectures.
License MIT
Informations about the package lararabbit
LaraRabbit: Elegant RabbitMQ integration for Laravel
LaraRabbit is a comprehensive, production-ready RabbitMQ integration package for Laravel designed specifically for microservices architecture. It provides an elegant abstraction over the PHP-AMQPLIB library with resilience patterns, performance optimizations, and developer-friendly features.
Features
- Simple, Expressive API: Intuitive interface for publishing and consuming messages
- Resilience Patterns: Circuit breaker and retry mechanisms to handle RabbitMQ outages gracefully
- Automatic Reconnection: Smart reconnection with exponential backoff and configurable retry limits
- Multiple Serialization Formats: Support for JSON and MessagePack serialization
- Message Validation: Schema validation for messages before publishing
- Dead Letter Queue Support: Built-in handling for failed messages
- Telemetry & Observability: Comprehensive logging and metrics
- Batch Processing Optimization: Efficient handling of large message batches with progress tracking
- Delivery Tag Caching: Improved reliability for message acknowledgement in complex scenarios
- Configurable Error Handling: Fine-grained control over error behavior
- Predefined Queues: Configure queues centrally and reuse them across your application
- Event Publishing: Structured events with automatic metadata and correlation tracking
Installation
The package will automatically register its service provider if you're using Laravel's package auto-discovery.
Configuration
Publish the configuration files:
This will create:
config/rabbitmq.php
file with all general configuration optionsconfig/rabbitmq-queues.php
file for predefined queue configurations
Basic Usage
Publishing Messages
Consuming Messages
Using Predefined Queues
Using Dead Letter Queues
CLI Commands
List all queues:
Purge a queue:
Advanced Usage
Message Validation
Serialization Formats
Connection Management
The package handles connections efficiently, but you can manually manage them:
Error Handling and Reconnection
LaraRabbit provides robust error handling and automatic reconnection capabilities:
For more details on error handling, see ERROR_HANDLING.md.
Testing
The package includes a PHPUnit test suite. You can run the tests with:
You can also run individual test suites:
Note: Some tests may fail if a RabbitMQ server is not available. This is expected behavior as certain tests require an actual connection to RabbitMQ. These tests are skipped by default in CI environments.
Documentation
LaraRabbit includes comprehensive documentation to help you get the most out of the package:
- Getting Started Guide - Essential steps to begin using LaraRabbit
- Configuration Guide - Detailed configuration options
- Publishing Messages - Advanced publishing techniques
- Consuming Messages - Consuming messages efficiently
- Error Handling - Robust error handling strategies
- Advanced Usage - Advanced patterns and techniques
License
This package is open-sourced software licensed under the MIT license.
Security
Security Recommendations
When using LaraRabbit in production environments, consider these security recommendations:
-
Use SSL/TLS: Always enable the SSL connection to RabbitMQ in production environments by setting
RABBITMQ_SSL=true
and providing proper certificates. -
Custom Credentials: Never use the default guest/guest credentials in production. Create a dedicated user with appropriate permissions.
-
Message Validation: Always use schema validation for messages to prevent malformed data.
-
Secure Vhost: Use a dedicated virtual host for your application and limit access to it.
- Network Segmentation: Place RabbitMQ behind a firewall and only allow connections from trusted sources.
Reporting Security Vulnerabilities
If you discover a security vulnerability within LaraRabbit, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.
Contributing
Please see CONTRIBUTING for details on how to contribute to this package.
Credits
- Ahmed Essam
- All Contributors
All versions of lararabbit with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
php-amqplib/php-amqplib Version ^3.5
rybakit/msgpack Version ^0.9