composer require jyil/aliwaremq
$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');
Aliwaremq is open-sourced software licensed under the MIT License.