Skip to content

PerfectExamples/Perfect-Kafka-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perfect-Kafka Demo简体中文

Get Involed with Perfect!

Star Perfect On Github Stack Overflow Follow Perfect on Twitter Join the Perfect Slack

Swift 3.0 Platforms OS X | Linux License Apache PerfectlySoft Twitter Slack Status

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.

Release Notes for MacOS X

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"

Release Notes for Linux

Before importing this library, please install librdkafka-dev first:

$ sudo apt-get install librdkafka-dev

Git Clone

Use the following command to clone this project:

$ git clone https://github.com/PerfectExamples/Perfect-Kafka-Demo.git

Setup Kafka Server

Please setup your Kafka server properly before running this demo, such as allow clients to setup a new topic like "testing".

Run Demo

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.

Issues

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

Further Information

For more information on the Perfect project, please visit perfect.org.