Browse Source

rename parameter

mq-subscribe
chrislu 8 months ago
parent
commit
5324e4288a
  1. 3
      weed/mq/client/cmd/weed_pub/publisher.go
  2. 3
      weed/mq/client/pub_client/publisher.go
  3. 2
      weed/mq/client/pub_client/scheduler.go

3
weed/mq/client/cmd/weed_pub/publisher.go

@ -47,8 +47,7 @@ func main() {
flag.Parse()
config := &pub_client.PublisherConfiguration{
Topic: topic.NewTopic(*namespace, *t),
CreateTopic: true,
CreateTopicPartitionCount: int32(*partitionCount),
PartitionCount: int32(*partitionCount),
Brokers: strings.Split(*seedBrokers, ","),
PublisherName: *clientName,
}

3
weed/mq/client/pub_client/publisher.go

@ -14,8 +14,7 @@ import (
type PublisherConfiguration struct {
Topic topic.Topic
CreateTopic bool
CreateTopicPartitionCount int32
PartitionCount int32
Brokers []string
PublisherName string // for debugging
}

2
weed/mq/client/pub_client/scheduler.go

@ -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
})

Loading…
Cancel
Save