mirror of
https://github.com/elyby/accounts.git
synced 2024-12-27 23:50:19 +05:30
Используем вызов методов AMQP либы через ... оператор
This commit is contained in:
parent
999f8237e4
commit
e6fa0fe6f3
@ -111,8 +111,8 @@ class Component extends \yii\base\Component {
|
||||
public function sendToExchange($exchangeName, $routingKey, $message, $exchangeArgs = [], $publishArgs = []) {
|
||||
$message = $this->prepareMessage($message);
|
||||
$channel = $this->getChannel();
|
||||
call_user_func_array([$channel, 'exchange_declare'], $this->prepareExchangeArgs($exchangeName, $exchangeArgs));
|
||||
call_user_func_array([$channel, 'basic_publish'], $this->preparePublishArgs($message, $exchangeName, $routingKey, $publishArgs));
|
||||
$channel->exchange_declare(...$this->prepareExchangeArgs($exchangeName, $exchangeArgs));
|
||||
$channel->basic_publish(...$this->preparePublishArgs($message, $exchangeName, $routingKey, $publishArgs));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user