You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by zi...@apache.org on 2024/01/09 04:00:15 UTC
(pulsar-client-go) branch master updated: [Issue 1105][pulsaradmin] fix AutoTopicCreation for type non-partitioned (#1107)
This is an automated email from the ASF dual-hosted git repository.
zike pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git
The following commit(s) were added to refs/heads/master by this push:
new cae74c52 [Issue 1105][pulsaradmin] fix AutoTopicCreation for type non-partitioned (#1107)
cae74c52 is described below
commit cae74c52064df302633acfa4fc9ad073cf2848ae
Author: Tom Jorissen <To...@cegeka.com>
AuthorDate: Tue Jan 9 05:00:10 2024 +0100
[Issue 1105][pulsaradmin] fix AutoTopicCreation for type non-partitioned (#1107)
Fixes #1105
### Motivation
To allow setting the AutoTopicCreation policy to non-partitioned it is required to not send the partitions parameter, by making Partitions a pointer instead of an int this is possible.
### Modifications
Change the type of Partitions in TopicAutoCreationConfig from int to *int
---
pulsaradmin/pkg/utils/topic_auto_creation_config.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pulsaradmin/pkg/utils/topic_auto_creation_config.go b/pulsaradmin/pkg/utils/topic_auto_creation_config.go
index 66646559..84445142 100644
--- a/pulsaradmin/pkg/utils/topic_auto_creation_config.go
+++ b/pulsaradmin/pkg/utils/topic_auto_creation_config.go
@@ -20,5 +20,5 @@ package utils
type TopicAutoCreationConfig struct {
Allow bool `json:"allowAutoTopicCreation"`
Type TopicType `json:"topicType"`
- Partitions int `json:"defaultNumPartitions"`
+ Partitions *int `json:"defaultNumPartitions"`
}