teamones / stomp-queue
Stomp client written in PHP for webman.
Installs: 6 605
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php-amqplib/php-amqplib: ^3.0
- workerman/stomp: ^1.0
README
Asynchronous STOMP client for webman.
Features
- Create exchange and queues with php-amqplib/php-amqplib component.
- Using /amq/queue/[queuename] mode to subscribe.
- Using /exchange/[exchangename]/[routing_key] mode to send message.
- 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) ] ] ]