Perfect-Kafka Demo简体中文
This project shows how to use Perfect-Kafka for streaming / messaging.
This package builds with Swift Package Manager and is part of the Perfect project but can also be used as an independent module.
Before importing this library, please install librdkafka first:
$ brew install librdkafka
Please also note that a proper pkg-config path setting is required:
$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
Before importing this library, please install librdkafka-dev first:
$ sudo apt-get install librdkafka-dev
Use the following command to clone this project:
$ git clone https://github.com/PerfectExamples/Perfect-Kafka-Demo.git
Please setup your Kafka server properly before running this demo, such as allow clients to setup a new topic like "testing".
There is a run.sh
inside this project and you can also write your own script to run it:
# build the producer
cd ProducerDemo
swift build
# build the consumer
cd ../ConsumerDemo
swift build
cd ..
# use nut.krb5.ca:9092 as message broker and test for 10 seconds
ConsumerDemo/.build/debug/ConsumerDemo testing nut.krb5.ca:9092 10 &
ProducerDemo/.build/debug/ProducerDemo testing nut.krb5.ca:9092 10 10
If success, there should be a mass of messages in traffic.
We are transitioning to using JIRA for all bugs and support related issues, therefore the GitHub issues has been disabled.
If you find a mistake, bug, or any other helpful suggestion you'd like to make on the docs please head over to http://jira.perfect.org:8080/servicedesk/customer/portal/1 and raise it.
A comprehensive list of open issues can be found at http://jira.perfect.org:8080/projects/ISS/issues
For more information on the Perfect project, please visit perfect.org.