shinomontaz/yii2-rabbit

yii2 rabbit 扩展

安装: 53

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:yii2-extension

dev-master 2017-10-31 22:41 UTC

This package is not auto-updated.

Last update: 2024-09-22 14:45:44 UTC


README

配置示例

'components' => [
        ...
'rabbit' => [
    'class' => 'shinomontaz\rabbit\Rabbit',
    'host' => '<host>',
    'port' => '<port>',
    'user' => '<user>',
    'password' => '<pass>',
    'vhost' => '<vhost>',
    'layout' => [
    '<exchangeName1>' => [
        'type' => '<direct>',
        'durable' => <durable>,
        'queues' => [
            '<queueName1>' => [
                'durable' => <durable>,
                'type' => '<direct>',
                'worker' => path\to\worker::class,
            ],
        ],
    ]
    ],
    ],
    ...
],
\Yii::$app->rabbit->schedule( $message, '<exchangeName>', 'routingKey');
php yii consoleController/process <queueName>