Coder Social home page Coder Social logo

kafka-demo's Introduction

Kafka quickstart

Download & Install

Click for downloading Kafka-2.13-3.5.0

tar -xzf kafka_2.13-3.5.0.tgz

cd kafka_2.13-3.5.0

Setup

setup zookeeper

$ bin/zookeeper-server-start.sh config/zookeeper.properties

setup kafka

$ bin/kafka-server-start.sh config/server.properties

Create A Topic

$ bin/kafka-topics.sh --create --topic quickstart-events --bootstrap-server localhost:9092

Write Events To Topic

$ bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:9092

> this is first event

> this is second event

> Ctrl+C # stop producer client

Read Events From Topic

$ bin/kafka-console-consumer.sh --topic quickstart-events --from-beginning --bootstrap-server localhost:9092

this is first event

this is second event

Ctrl+C # stop consumer client


Springboot + Kafka

Dependencies

click pom.xml for lookup


Redis quickstart

Install

click for Redis Installation detail

redis data types

$ sudo vi /etc/redis/redis.conf

change bind for remoting connect, change protected-mode no for no auth.

$ sudo systemctl enable redis-server enable redis service unit

$ sudo systemctl restart redis restart redis server

Check Installation

$ redis-cli

127.0.0.1:6379> set hello redis

127.0.0.1:6379> get hello

"redis"


Redis Insight Install

redis gui


Springboot + Redis

<!-- dependency -->
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-redis</artifactId>
    </dependency>
</dependencies>

kafka-demo's People

Contributors

xieliangji avatar

Watchers

 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.