2017 © Pedro Peláez
 

yii2-extension yii2-kafka

yii2 kafka扩展

image

xiaochengfu/yii2-kafka

yii2 kafka扩展

  • Thursday, December 28, 2017
  • by xiaochengfu
  • Repository
  • 1 Watchers
  • 1 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 67 % Grown

The README.md

yii2-kafka

yii2-kafka消息队列,对接阿里云的kafak消息队列, (*1)

配置

在common/config/params.php 添加如下参数:, (*2)

<?php
return [
    'kafka'=>[
        'sasl_plain_username' => '填写阿里云的Access Key ID',
        'sasl_plain_password' => '填写阿里云的Access Key Secret后10位',
        'bootstrap_servers' => "kafka-ons-internet.aliyun.com:8080",
        'topic_name' => '您的topic名称',
        'consumer_id' => '您的CID',
        'processName'=>'kafka-master',//j进程名称
        'callback'=>'common\\components\\kafka\\Consumer'//消费业务回调处理名字空间
    ]
];

启动消费进程

./yii kafka-consumer/start

发布消息

Yii::$app->mq->poll(['1'=>'我收到了','2'=>'我成功了'])

The Versions

28/12 2017

dev-master

9999999-dev

yii2 kafka扩展

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 kafka yii2-kafka

28/12 2017

v1.0.1

1.0.1.0

yii2 kafka扩展

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 kafka yii2-kafka