PHP code example of teamones / stomp-queue

1. Go to this page and download the library: Download teamones/stomp-queue 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/ */

    

teamones / stomp-queue example snippets


return [
    'default' => [
        'host' => 'stomp://' . env("rabbitmq_host", '127.0.0.1') . ':' . env("rabbitmq_stomp_port", 61613),
        'options' => [
            'vhost' => env("rabbitmq_vhost", '/'),
            'login' => env("rabbitmq_user", 'guest'),
            'passcode' => env("rabbitmq_password", 'guest'),
            'debug' => (bool)env("app_debug", false),
        ],
        'amqp' => [
            'host' => env("rabbitmq_host", '127.0.0.1'),
            'port' => env("rabbitmq_amqp_port", 5672),
            'namespace' => env("belong_system", ''),
            'exchange_name' => env("rabbitmq_exchange_name", 'exchange'),
            'exchange_delay' => (bool)env("rabbitmq_exchange_delay", true)
        ]
    ]
]