Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kafka-Studies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
최석원
kafka-Studies
Commits
7264e5e5
Unverified
Commit
7264e5e5
authored
4 years ago
by
defaultSouth
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
README: Add some CLI commands
parent
539ce491
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+53
-0
53 additions, 0 deletions
README.md
with
53 additions
and
0 deletions
README.md
+
53
−
0
View file @
7264e5e5
...
...
@@ -26,6 +26,59 @@ WIN10@DESKTOP:~$ kafka-server-start config/server.properties
```
## CLI 명령어
1.
토픽 만들기 (파티션=3, 복제 계수=2)
```
console
WIN10@DESKTOP:~$
kafka-topics
--zookeeper
localhost:2181
--topic
first-topic
--create
--partitions
3
--replication-factor
2
```
2.
토픽 목록 보기
```
console
WIN10@DESKTOP:~$
kafka-topics
--zookeeper
localhost:2181
--list
first-topic
second-topic
```
3.
토픽 설정 보기
```
console
WIN10@DESKTOP:~$
kafka-topics
--zookeeper
localhost:2181
--topic
first-topic
--describe
Topic: first-topic PartitionCount: 3 ReplicationFactor: 1 Configs:
Topic: first-topic Partition: 0 Leader: 0 Replicas: 0 Isr: 0
Topic: first-topic Partition: 1 Leader: 0 Replicas: 0 Isr: 0
Topic: first-topic Partition: 2 Leader: 0 Replicas: 0 Isr: 0
```
4.
토픽 컨슈머 (프로듀서 작동할 때)
```
console
WIN10@DESKTOP:~$
kafka-console-consumer
--bootstrap-server
localhost:9092
--topic
first-topic
```
5.
토픽 그룹 이름 설정 및 컨슈머
```
console
WIN10@DESKTOP:~$
kafka-console-consumer
--bootstrap-server
localhost:9092
--topic
first-topic
--group
group-one
```
6.
토픽 컨슈머 그룹 목록
```
console
WIN10@DESKTOP:~$
kafka-consumer-groups
--bootstrap-server
localhost:9092
--list
group-one
```
7.
토픽 오프셋 초기화
```
console
WIN10@DESKTOP:~$
kafka-consumer-groups
--bootstrap-server
localhost:9092
--topic
first-topic
--group
group-one
--reset-offsets
--to-earliest
--execute
GROUP TOPIC PARTITION NEW-OFFSET
group-one first-topic 0 0
group-one first-topic 1 0
group-one first-topic 2 0
```
## 목차
<table>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment