Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Commit

Permalink
Remove deprecated and unused broker list. (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeteo authored Jul 6, 2018
1 parent 0719201 commit cd5a6fc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 32 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ v0.1.9 (unreleased)
- Remove Offset.Initial.Reset config since it is unused.
- Add Offset.Commit.Enabled config to enable auto offset commit.
- Tune partition consumer logs to debug level
- Remove Topic.BrokerList since it was unused in favor of NameResolver to resolve broker list.


v0.1.8 (2018-06-04)
Expand Down
10 changes: 4 additions & 6 deletions internal/consumer/clusterConsumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ func TestClusterConsumerTestSuite(t *testing.T) {
func (s *ClusterConsumerTestSuite) SetupTest() {
topic := kafka.ConsumerTopic{
Topic: kafka.Topic{
Name: "unit-test",
Cluster: "production-cluster",
BrokerList: nil,
Name: "unit-test",
Cluster: "production-cluster",
},
DLQ: kafka.Topic{
Name: "unit-test-dlq",
Cluster: "dlq-cluster",
BrokerList: nil,
Name: "unit-test-dlq",
Cluster: "dlq-cluster",
},
}
s.topic = topic.Topic.Name
Expand Down
10 changes: 4 additions & 6 deletions internal/consumer/multiClusterConsumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ var _ kafka.Consumer = (*MultiClusterConsumer)(nil)
func (s *MultiClusterConsumerTestSuite) SetupTest() {
topic := kafka.ConsumerTopic{
Topic: kafka.Topic{
Name: "unit-test",
Cluster: "production-cluster",
BrokerList: nil,
Name: "unit-test",
Cluster: "production-cluster",
},
DLQ: kafka.Topic{
Name: "unit-test-dlq",
Cluster: "dlq-cluster",
BrokerList: nil,
Name: "unit-test-dlq",
Cluster: "dlq-cluster",
},
}
s.topics = []kafka.ConsumerTopic{topic}
Expand Down
4 changes: 0 additions & 4 deletions kafka/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ type (
Name string
// Cluster is the logical name of the cluster to find this topic on.
Cluster string
// BrokerList for the cluster to consume this topic from
// If this is empty, we will get the broker list using the NameResolver
// TODO (gteo): remove this and rely on a NameResolver as single source for broker IP
BrokerList []string
// Delay is msg consumption delay applied on the topic.
Delay time.Duration
}
Expand Down
16 changes: 0 additions & 16 deletions kafka/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,20 @@ func (s *ConsumerConfigTestSuite) SetupTest() {
Topic: Topic{
Name: "topic1",
Cluster: "cluster1",
BrokerList: []string{
"broker1",
"broker2",
},
},
DLQ: Topic{
Name: "dlq_topic1",
Cluster: "dlq_cluster1",
BrokerList: []string{
"dlq_broker1",
"dlq_broker2",
},
},
}
s.topic2 = ConsumerTopic{
Topic: Topic{
Name: "topic2",
Cluster: "cluster2",
BrokerList: []string{
"broker1",
"broker2",
},
},
DLQ: Topic{
Name: "dlq_topic2",
Cluster: "dlq_cluster1",
BrokerList: []string{
"dlq_broker1",
"dlq_broker2",
},
},
}
s.config = ConsumerConfig{
Expand Down

0 comments on commit cd5a6fc

Please sign in to comment.