rename parameter
This commit is contained in:
@@ -47,8 +47,7 @@ func main() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
config := &pub_client.PublisherConfiguration{
|
config := &pub_client.PublisherConfiguration{
|
||||||
Topic: topic.NewTopic(*namespace, *t),
|
Topic: topic.NewTopic(*namespace, *t),
|
||||||
CreateTopic: true,
|
PartitionCount: int32(*partitionCount),
|
||||||
CreateTopicPartitionCount: int32(*partitionCount),
|
|
||||||
Brokers: strings.Split(*seedBrokers, ","),
|
Brokers: strings.Split(*seedBrokers, ","),
|
||||||
PublisherName: *clientName,
|
PublisherName: *clientName,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ import (
|
|||||||
|
|
||||||
type PublisherConfiguration struct {
|
type PublisherConfiguration struct {
|
||||||
Topic topic.Topic
|
Topic topic.Topic
|
||||||
CreateTopic bool
|
PartitionCount int32
|
||||||
CreateTopicPartitionCount int32
|
|
||||||
Brokers []string
|
Brokers []string
|
||||||
PublisherName string // for debugging
|
PublisherName string // for debugging
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ func (p *TopicPublisher) doConfigureTopic() (err error) {
|
|||||||
func(client mq_pb.SeaweedMessagingClient) error {
|
func(client mq_pb.SeaweedMessagingClient) error {
|
||||||
_, err := client.ConfigureTopic(context.Background(), &mq_pb.ConfigureTopicRequest{
|
_, err := client.ConfigureTopic(context.Background(), &mq_pb.ConfigureTopicRequest{
|
||||||
Topic: p.config.Topic.ToPbTopic(),
|
Topic: p.config.Topic.ToPbTopic(),
|
||||||
PartitionCount: p.config.CreateTopicPartitionCount,
|
PartitionCount: p.config.PartitionCount,
|
||||||
})
|
})
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user