jyil / aliwaremq
aliwaremq
1.2.0
2020-03-10 12:52 UTC
Requires
- php: >=7.2
- php-amqplib/php-amqplib: ^2.9
Requires (Dev)
- php: >=7.2
- phpunit/phpunit: ~6.5
README
Support
Composer
composer require jyil/aliwaremq
Example
$provider = new AliyunCredentialsProvider([
'host' => '*',
'port' => '*',
'virtualHost' => '*',
'accessKey' => '*',
'accessSecret' => '*',
'resourceOwnerId' => '*',
]);
// send
$provider->send('queue', 'Hello World');
$provider->send('queue', 'Hello World', 'exchange', 'exchangeType');
// receive
$provider->receive('queue', '', function ($msgBody) {
echo 'body---' . $msgBody;
});
$provider->receive('queue', '', function ($msgBody) {
echo 'body---' . $msgBody;
}, 'exchange', 'exchangeType');
License
Aliwaremq is open-sourced software licensed under the MIT License.