hello-play-kafka

所属分类:中间件编程
开发工具:Scala
文件大小:0KB
下载次数:0
上传日期:2018-02-14 23:28:42
上 传 者sh-1993
说明:  你好,玩卡夫卡,,
(hello-play-kafka,,)

文件列表:
Procfile (155, 2018-02-14)
app.json (270, 2018-02-14)
app/ (0, 2018-02-14)
app/Module.scala (201, 2018-02-14)
app/controllers/ (0, 2018-02-14)
app/controllers/HomeController.scala (797, 2018-02-14)
app/services/ (0, 2018-02-14)
app/services/Kafka.scala (3526, 2018-02-14)
app/views/ (0, 2018-02-14)
app/views/index.scala.html (442, 2018-02-14)
app/workers/ (0, 2018-02-14)
app/workers/RandomNumbers.scala (882, 2018-02-14)
build.sbt (260, 2018-02-14)
conf/ (0, 2018-02-14)
conf/application.conf (842, 2018-02-14)
conf/logback.xml (690, 2018-02-14)
conf/routes (225, 2018-02-14)
project/ (0, 2018-02-14)
project/build.properties (18, 2018-02-14)
project/plugins.sbt (60, 2018-02-14)
sbt (153, 2018-02-14)
sbt-launch.jar (1210231, 2018-02-14)
sbt.cmd (3041, 2018-02-14)

Hello Play Kafka ---------------- ## Cloud Setup 1. [![Deploy on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) 1. Install the Kafka plugin into the Heroku CLI heroku plugins:install heroku-kafka 1. Wait for Kafka to be provisioned: heroku kafka:wait -a YOUR_APP 1. Add a new Kafka topic: heroku kafka:topics:create RandomNumbers --partitions 32 -a YOUR_APP 1. Add a new Kafka consumer group: heroku kafka:consumer-groups:create main 1. Watch the Kafka log heroku kafka:topics:tail RandomNumbers -a YOUR_APP 1. Check out the random numbers: heroku open -a YOUR_APP ## Local Setup > This uses the same Kafka system as above. 1. Clone the source: git clone https://github.com/jamesward/hello-play-kafka 1. Associate the local source with your Heroku app: heroku git:remote -a YOUR_APP 1. Setup a `.env` file with the necessary info: heroku config -s > .env 1. Run the web app: set -o allexport source .env set +o allexport ./sbt ~run 1. Run the worker: set -o allexport source .env set +o allexport ./sbt "runMain workers.RandomNumbers" 1. Check out the app: http://localhost:9000

近期下载者

相关文件


收藏者