mlyahmed commented on issue #9585:
URL: https://github.com/apache/pulsar/issues/9585#issuecomment-778834699


   Hi,
   
   Could you please share more about the way you’ve proceeded? and the version 
you’ve used ?
   
   Actually I created a partitioned topic through the cli let’s say :
   `pulsar-admin topics create-partitioned-topic 
persistent://public/default/issue-9585  -p 3`
   
   Created a consumer with the minimum options: topic + subscriptionName:
   `pulsar-client consume -s ahmed -n 0 persistent://public/default/issue-9585`
   
   When I deleted the topic without the force flag, -f,  I got an error 
explaining that there is a current active procuder/subscription.
   
   When I delete the topic with the force flag, -f, the topic is deleted. The 
consumer resubscribes to new topics with the same names as the previous 
partitions:
   
   ```
   19:55:43.580 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - 
[persistent://public/default/issue-9585-partition-1][ahmed] Subscribed to topic 
on localhost/127.0.0.1:6650 -- consumer: 1
   19:55:43.589 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - 
[persistent://public/default/issue-9585-partition-0][ahmed] Subscribed to topic 
on localhost/127.0.0.1:6650 -- consumer: 0
   19:55:43.595 [pulsar-client-io-1-1] INFO  
org.apache.pulsar.client.impl.ConsumerImpl - 
[persistent://public/default/issue-9585-partition-2][ahmed] Subscribed to topic 
on localhost/127.0.0.1:6650 -- consumer: 2
   ```
   
   And when I try to recreate the partitioned topic this error is thrown due 
the topics created by the consumer:
   
   ```
   9:55:48.317 [AsyncHttpClient-7-1] WARN  
org.apache.pulsar.client.admin.internal.BaseResource - 
[http://localhost:8080/admin/v2/persistent/public/default/issue-9585/partitions]
 Failed to perform http put request: javax.ws.rs.ClientErrorException: HTTP 409 
Conflict
   This topic already exists
   
   Reason: This topic already exists
   ```
   
   
   I’ve also tested with the Go client and ended up with the same issue. And 
also, the Go consumer fall in error due to the number of partitions changed:
   
   ```
   goroutine 85 [running]:
   
github.com/apache/pulsar-client-go/pulsar.(*consumer).internalTopicSubscribeToPartitions(0xc000282300,
 0x0, 0x0)
           
/home/ahmed/tmp/pulsar/go-client/vendor/github.com/apache/pulsar-client-go/pulsar/consumer_impl.go:279
 +0x890
   
github.com/apache/pulsar-client-go/pulsar.newInternalConsumer.func1(0xc000282300)
           
/home/ahmed/tmp/pulsar/go-client/vendor/github.com/apache/pulsar-client-go/pulsar/consumer_impl.go:238
 +0xc8
   created by github.com/apache/pulsar-client-go/pulsar.newInternalConsumer
           
/home/ahmed/tmp/pulsar/go-client/vendor/github.com/apache/pulsar-client-go/pulsar/consumer_impl.go:235
 +0x2bc
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to