Giter Site home page Giter Site logo

oscarwong79 / kafka_plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tp-lab/kafka_plugin

1.0 0.0 0.0 62 KB

EOSIO Kafka Plugin is used for building real-time data pipelines and streaming apps. This plugin allows you to utilize all of Kafka’s rich real-time features utilizing the EOS blockchain.

Home Page: https://www.tokenpocket.pro

License: MIT License

CMake 1.57% C++ 98.43%

kafka_plugin's Introduction

EOSIO Kafka Plugin

what's eosio kafka plugin

EOSIO Kafka Plugin is used to receive the transaction data fom blockchain and send out the transaction through kafka producer. Developer can receive the transaction data through kafka consumer in the background application.

how does the kafka plugin work

  1. it run a task to resume the transactions on chain. there's two type of transactions:"applied transaction" and "accepted transaction"

  2. create two kafka topics, the producer of which store the applied transaction and accepted transaction in kafka queue

  3. the dapp developer can get the transaction data through the consumer of the kafka topic.

Based eosio version

EOS-Mainnet/eos mainnet-1.6.1 or later

Building the plugin [Install on your nodeos server]

  1. install kafka library
cd /usr/local
git clone https://github.com/edenhill/librdkafka.git
cd librdkafka
./configure
make
sudo make install
  1. download the kafka plugin code in to eos file
cd /usr/local/eos/plugins/
git clone https://github.com/TP-Lab/kafka_plugin.git
  1. update the CMakeLists.txt to complie the kafka plugin
(1)edit /usr/local/eos/plugins/CMakeLists.txt:
add_subdirectory(kafka_plugin)

(2)edit /usr/local/eos/programs/nodeos/CMakeLists.txt:
target_link_libraries( nodeos PRIVATE -Wl,${whole_archive_flag} kafka_plugin -Wl,${no_whole_archive_flag} )

How to setup on your nodeos

Enable this plugin using --plugin option to nodeos or in your config.ini. Use nodeos --help to see options used by this plugin.

Configuration

Add the following to config.ini to enable the plugin:

parmeters for kafka_plugin
 --plugin eosio::kafka_plugin     //add kafka plugin
 --kafka-uri 192.168.31.225:9092    //the kafka service 
 --accept_trx_topic eos_accept_topic //the kafka topic for accept transaction
 --applied_trx_topic eos_applied_topic //the applied topic for applied transaction
 --kafka-block-start 100  //the start block number, from which kafka begin to receive transactions
 --kafka-queue-size 5000  // the queue size of kafka

kafka_plugin's People

Contributors

heipacker avatar fire520 avatar chendatony31 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.