PHP code example of 6phere / horizon-wildcard-consumer

1. Go to this page and download the library: Download 6phere/horizon-wildcard-consumer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

6phere / horizon-wildcard-consumer example snippets


'environments' => [
    'production' => [
        'supervisor-1' => [
            'connection' => 'redis',
            'queue' => ['default', 'user_*_notes', '*-bills'],
            'balance' => 'auto',
            'processes' => 10,
            'tries' => 3,
        ],
        'supervisor-2' => [
            'connection' => 'redis',
            'queue' => ['agent_*_calls', 'company_*_messages'],
            'balance' => 'auto',
            'processes' => 5,
            'tries' => 3,
        ]
    ]
]
sh
php artisan horizon:wildcard-consume
ini
QUEUE_CONNECTION=redis
QUEUE_OBSERVER_TIMEOUT=25
ini
QUEUE_CONNECTION=rabbitmq
QUEUE_OBSERVER_TIMEOUT=25
RABBITMQ_WORKER=horizon
RABBITMQ_API_URL=http://localhost:15672
RABBITMQ_HOST=rabbitmq
RABBITMQ_PORT=5672
RABBITMQ_LOGIN=admin
RABBITMQ_PASSWORD=admin
RABBITMQ_SSL=0
RABBITMQ_QUEUE=default
RABBITMQ_VHOST=/