-
Notifications
You must be signed in to change notification settings - Fork 189
Implemented Kafka client #685
Implemented Kafka client #685
Conversation
786f6a6
to
fee0356
Compare
1f615dd
to
eb627a0
Compare
eb627a0
to
89e7621
Compare
@@ -347,6 +347,7 @@ func doFmt(cmdline []string) { | |||
"--tests", | |||
"--disable-all", | |||
"--enable=gofmt", | |||
"--timeout=2m", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related to this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, the linter is failed with timeout error.
type KafkaConfig struct { | ||
saramaConfig *sarama.Config // kafka client configurations. | ||
brokers []string // brokers is a list of broker URLs. | ||
partitions int32 // partitions is the number of partitions of a topic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure what I understand is correct, partition is a unit of distributed processing and replica is a unit of replication, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, a topic is kinda message queue which consists of several partitions to process message in parallel. The replica(= replication factor) is how many partitions are copied to other brokers.
For example, topic1(T1) has three partitions. Broker1 is a leader for topic1-partition1(T1-P1) and the other brokers have the replicated T1-P1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully Understood :)
Proposed changes
Publish
,CreateTopic
,DeleteTopic
,ListTopics
are implemented and used later on.Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)