This connector reads transactions from the Ethereum blockchain and writes them to Kafka.
>mvn clean package
-
Install Kafka
-
Get an API key to the Ethereum service at www.infura.com
The following instructions assume the following directory structure:
project-folder/
|
|--- kafka_2.12-1.1.0/
| |- bin/
| |- ...
|--- kafka-ethereum-connector/
>cd ../kafka_2.12-1.1.0
-
Start Zookeeper
bin/zookeeper-server-start.sh config/zookeeper.properties
-
Start Kafka
bin/kafka-server-start.sh config/server.properties
-
Create a topic
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic connect-test
-
List Topics
bin/kafka-topics.sh --zookeeper localhost:2181 --describe
-
Setup a subscriber
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic connect-test --from-beginning
-
Start the connector
cd ../kafka-ethereum-connector ../kafka_2.12-1.1.0/bin/connect-standalone.sh config/connect-standalone.properties config/connect-ethereum-source.properties
-
Verify that transactions are being printed in the subscriber (See step 6. above)
mvn clean package
docker-compose up -d