Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

rename parameter

chrislu5324e4288ae8
diff --git a/weed/mq/client/cmd/weed_pub/publisher.go b/weed/mq/client/cmd/weed_pub/publisher.go
index e9227130af..482e283846 100644
--- a/weed/mq/client/cmd/weed_pub/publisher.go
+++ b/weed/mq/client/cmd/weed_pub/publisher.go
@@ -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)
diff --git a/weed/mq/client/pub_client/publisher.go b/weed/mq/client/pub_client/publisher.go
index 09984bae39..4dfce40303 100644
--- a/weed/mq/client/pub_client/publisher.go
+++ b/weed/mq/client/pub_client/publisher.go
@@ -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 {
diff --git a/weed/mq/client/pub_client/scheduler.go b/weed/mq/client/pub_client/scheduler.go
index e92e07ab5f..a8d7079c9d 100644
--- a/weed/mq/client/pub_client/scheduler.go
+++ b/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
})