imponeer / queue-interop-connection-factory-helper
Helper that creates queue-interop connection factory based on DSN
Requires
- php: ^8.3
- queue-interop/queue-interop: ^0.8
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^12.0
- squizlabs/php_codesniffer: ^3.8
Suggests
- enqueue/amqp-bunny: For AMQP Bunny queue support
- enqueue/amqp-ext: For AMQP extension queue support
- enqueue/amqp-lib: For AMQP Lib queue support
- enqueue/dbal: For DBAL/MySQL queue support
- enqueue/fs: For filesystem queue support
- enqueue/gearman: For Gearman queue support
- enqueue/gps: For Google Pub/Sub queue support
- enqueue/mongodb: For MongoDB queue support
- enqueue/null: For null queue support (testing)
- enqueue/pheanstalk: For Beanstalk queue support
- enqueue/rdkafka: For Apache Kafka queue support
- enqueue/redis: For Redis queue support
- enqueue/sqs: For Amazon SQS queue support
- enqueue/stomp: For STOMP queue support
- enqueue/wamp: For WAMP queue support
README
Queue-Interop Connection Factory Helper
A PHP library that simplifies creating queue-interop connection factories from DSN (Data Source Name) strings. This helper allows you to easily configure and instantiate queue connections for various message queue systems using a unified DSN format.
Installation
composer require imponeer/queue-interop-connection-factory-helper
Supported Queue Transports
To use a specific transport, you must also include the corresponding library in your project:
Transport | Prefix | Library |
---|---|---|
AMQP | amqp | enqueue/amqp-ext enqueue/amqp-lib enqueue/amqp-bunny |
Beanstalk | beanstalk | enqueue/pheanstalk |
Stomp | stomp | enqueue/stomp |
Amazon Simple Queue Service (SQS) | sqs | enqueue/sqs |
Google PubSub | gps | enqueue/gps |
Apache Kafka | kafka | enqueue/rdkafka |
Redis | redis | enqueue/redis |
MongoDB | mongodb | enqueue/mongodb |
Gearman | gearman | enqueue/gearman |
MySQL | mysql | enqueue/dbal |
File | file | enqueue/fs |
Null | null | enqueue/null |
Wamp | wamp ws |
enqueue/wamp |
Usage
use Imponeer\QueueInteropConnectionFactoryHelper; $context = QueueInteropConnectionFactoryHelper::createContext('file:');
Development
This project includes several development tools to maintain code quality:
Run tests with testdox output:
composer test
Check code style (PSR-12):
composer phpcs
Fix code style issues automatically:
composer phpcbf
Run static analysis:
composer phpstan
API Documentation
Full API documentation is available in the repository wiki. Documentation is automatically updated with every release.
How to Contribute
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Run the development tools to ensure code quality
- Submit a pull request
For bug reports or questions, please use the issues tab.