heroku-kafka-demo-go

command module
v0.0.0-...-1348794 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: ISC Imports: 10 Imported by: 0

README

heroku-kafka-demo-go

A simple Heroku app that demonstrates using Apache Kafka on Heroku in Go. 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

Clone the repo:

$ git clone git@github.com:heroku/heroku-kafka-demo-go.git

Create a heroku app with Apache Kafka on Heroku attached:

$ cd heroku-kafka-demo-go
$ heroku apps:create your-cool-app-name
$ heroku addons:create heroku-kafka:basic-0

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

$ heroku kafka:topics:create messages

Create the consumer group:

Note: This assumes that you are using a basic-0 as specified above. This step is not necessary for standard, private, or shield Apache Kafka on Heroku plans.

$ heroku kafka:consumer-groups:create heroku-kafka-demo-go

Deploy to Heroku and open the app:

$ git push heroku main
$ heroku open

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL