Git Product home page Git Product logo

number-merger-kafka-streams's Introduction

Random Number Generator

This random Number Generator generates a random number and sends it to a kafka topic with key: and value:

Setup on MacOS

install homebrew: https://brew.sh/

Install Java, Docker, IntelliJ, k9s, ...

brew install openjdk k9s kafka gradle kubernetes-cli micronaut
brew install --cask intellij-idea-ce docker

Get a docker account and setup the "number-merger-kafka-streams" repo

Configure docker to run kubernetes (k8s) -> See Settings of Docker

start zookeeper

zookeeper-server-start kafka-config/zookeeper.properties &

start kafka

kafka-server-start kafka-config/server.properties &

Change the docker image path in your build.gradle and k8s.yml. Login to your Docker Desktop application.

./gradlew clean build jib

kubectl create namespace dev

kubectl apply -f k8s.yml -n dev

See log form pod

kubectl get pods -n dev

kubectl logs number-merger-kafka-streams-<something-something> -n dev -f

Read from Kafka

kafka-console-consumer --bootstrap-server localhost:9092 --topic random-number-1-v1 --property key=value --property print.key=true --property key.separator="-" --from-beginning

Stop Kafka

zookeeper-server-stop && kafka-server-stop

Links

https://docs.micronaut.io/latest/guide/

https://micronaut-projects.github.io/micronaut-kafka/latest/guide/

Micronaut 3.0.1 Documentation


Feature kafka documentation

Feature kubernetes documentation

Feature http-client documentation

Feature management documentation

Feature lombok documentation

number-merger-kafka-streams's People

Watchers

Makele G. 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.