We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed7f745 commit 21682acCopy full SHA for 21682ac
pkg/pulsar/topic.go
@@ -250,10 +250,13 @@ func (c *pulsarClient) Topics() Topics {
250
251
func (t *topics) Create(topic utils.TopicName, partitions int) error {
252
endpoint := t.pulsar.endpoint(t.basePath, topic.GetRestPath(), "partitions")
253
+ data := &partitions
254
if partitions == 0 {
255
endpoint = t.pulsar.endpoint(t.basePath, topic.GetRestPath())
256
+ data = nil
257
}
- return t.pulsar.Client.Put(endpoint, partitions)
258
+
259
+ return t.pulsar.Client.Put(endpoint, data)
260
261
262
func (t *topics) Delete(topic utils.TopicName, force bool, nonPartitioned bool) error {
0 commit comments