Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
Kafka
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramu Dosapati
Kafka
Commits
0d80b967
Commit
0d80b967
authored
Nov 04, 2022
by
Ramu Dosapati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
37b68428
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
0 deletions
+86
-0
README.md
README.md
+86
-0
No files found.
README.md
View file @
0d80b967
# Kafka
Commands :
Run these commands from root folder .
Run zookeeper:
.
\b
in
\w
indows
\z
ookeeper-server-start.bat .
\c
onfig
\z
ookeeper.properties
Run Kafka server
.
\b
in
\w
indows
\k
afka-server-start.bat .
\c
onfig
\s
erver.properties
Create a topic:
.
\b
in
\w
indows
\k
afka-topics.bat --create --topic first_topic --bootstrap-server localhost:9092
Run Producer:
.
\b
in
\w
indows
\k
afka-console-producer.bat --topic first_topic --bootstrap-server localhost:9092
-
Run Consumer:
.
\b
in
\w
indows
\k
afka-console-consumer.bat --topic third --from-beginning --bootstrap-server localhost:9092
Check all topis:
.
\b
in
\w
indows
\k
afka-topics.bat --zookeeper localhost:2181 --list
mvn clean install -DskipTests
cd src/main/resources/docker
docker-compose -f kafka-docker-compose.yml up -d (to run kafka and zookeeper servers)
docker-compose -f kafka-docker-compose.yml ps (to know about the status)
docker exec it name bash (to go particular specific point)
kafka-console-producer --bootstrap-server localhost:9092 --topic topic_name stock-live
kafka-console-consumer --bootstrap-server localhost:9092 --topic adult stock-live
docker run -p 61616:61616 -p 8161:8161 rmohr/activemq
Docker :
To fix environment compatibility errors we can setup docker files
and we can compose docker container if we want more than one container
version: '2'
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3-debian-10
ports:
-
'2181:2181'
volumes:
-
'zookeeper_data:/bitnami'
environment:
-
ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: docker.io/bitnami/kafka:2-debian-10
hostname: localhost
ports:
-
'9092:9092'
volumes:
-
'kafka_data:/bitnami'
environment:
-
KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
-
ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
-
zookeeper
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local
kafka-producer:
container_name: kafka-producer
image: docker.io/bitnami/kafka:2-debian-10
build:
context:
working_dir: /kafka
entrypoint: /bin/bash
stdin_open: true
tty: true
create docker-image for springboot:
------------------------------
docker build -f dockerFileName -t customeImageName .
docker images (to see what all images are there)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment