承接 michaeldouglas/debeziumstream 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

michaeldouglas/debeziumstream

Composer 安装命令:

composer require michaeldouglas/debeziumstream

包简介

A client library to work with debezium and apache kafka for Database stream.

README 文档

README

Requirements

  1. Guzzle HTTP
  2. Laravel 5.2+

Install Library

in folder of project run:

$ composer require michaeldouglas/debeziumstream

Configure Apache KAFKA and DEBEZIUM

Insert into .env file the folowers config lke example:

KAFKA_HOST=18.231.179.169
KAFKA_PORT=9092
KAFKA_CONNECT_HOST=18.231.179.169:8083"
KAFKA_CONSUMER_BINARY="kafka-console-consumer"
KAFKA_CONSUMER_BINARY_PATH=/usr/local/etc/confluent/bin
 
DEBEZIUM_DB_CONNECTOR=mysql
DEBEZIUM_DB_CONNECTOR_NAME=otrs3-connector
DEBEZIUM_DB_HOST=127.0.0.1
DEBEZIUM_DB_DATABASE=otrs5
DEBEZIUM_DB_SERVER_ID=1
DEBEZIUM_DB_SERVER_NAME=localdb
DEBEZIUM_DB_USER=root
DEBEZIUM_DB_PASSWORD=

Configure Service Provider

In file config\app.php inside providers put the code:

 MichaelDouglas\DebeziumStream\Providers\DebeziumKafkaServiceProvider::class

Publish config files

$ php artisan vendor:publish

Configure class to receive KAFKA EVENTS

In file config\kafka.php

 /*
    |--------------------------------------------------------------------------
    | Handle Class
    |--------------------------------------------------------------------------
    | The class who will receive Kafka Topic Messages
    */
    'handler_class' => 'your class here',
 
    /*
    |--------------------------------------------------------------------------
    | Handle Methods
    |--------------------------------------------------------------------------
    | The class methods who will receiver Kafka Events
    */
    'event_methods' => [
       'create' => 'your method here',
       'update' => 'your method here',
       'delete' => 'your method here'
    ]

The params look like this example:

class TestService
{


    public function create($after, $topic)
    {

    }


    public function update($before, $after, $topic)
    {

    }



    public function delete($before, $topic)
    {

    }


}

Init Kafka Consumer Work

$ php artisan kafka:listen --topic=topic_name

laravel-debeziumstream

统计信息

  • 总下载量: 53
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2018-08-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固