teamones/stomp-queue

There is no license information available for the latest version (0.1.5) of this package.

Stomp client written in PHP for webman.

0.1.5 2022-06-13 09:32 UTC

This package is auto-updated.

Last update: 2024-04-13 13:20:32 UTC


README

Asynchronous STOMP client for webman.

Features

  1. Create exchange and queues with php-amqplib/php-amqplib component.
  2. Using /amq/queue/[queuename] mode to subscribe.
  3. Using /exchange/[exchangename]/[routing_key] mode to send message.
  4. Support delayed message by rabbitmq_delayed_message_exchange plugin.

Document

https://www.workerman.net/doc/webman#/queue/stomp

Install

composer require teamones/stomp-queue

config

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)
        ]
    ]
]