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