GithubHelp home page GithubHelp logo

hotsen / heroku-kafka-demo-ruby Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heroku/heroku-kafka-demo-ruby

0.0 2.0 0.0 308 KB

A simple demo app to show off Heroku Kafka from Ruby

License: ISC License

Ruby 39.31% JavaScript 8.83% HTML 51.86%

heroku-kafka-demo-ruby's Introduction

heroku-kafka-demo-ruby

A simple heroku app that demonstrates using Kafka in ruby. This demo app accepts HTTP POST requests and writes them to a topic, and has a simple page that shows the last 10 messages produced to that topic.

You'll need to provision the app.

Provisioning

Install the kafka cli plugin:

$ heroku plugins:install heroku-kafka

Create a heroku app with Kafka attached:

$ heroku apps:create your-cool-app-name
$ heroku git:remote -a your-cool-app-name
$ heroku addons:create heroku-kafka:basic-0

Create the sample topic and consumer group. By default, the topic will have 8 partitions:

$ heroku kafka:topics:create messages
$ heroku kafka:consumer-groups:create heroku-kafka-demo

Deploy to Heroku and open the app:

$ git push heroku master
$ heroku open

You can send messages via the web UI or the CLI:

curl -X POST `heroku apps:info | awk '/Web URL/ {print $3}'`messages -d 'your-message-text'

heroku-kafka-demo-ruby's People

Contributors

cji avatar halorgium avatar jdowning avatar rand avatar tcrayford avatar

Watchers

 avatar  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.