cckellogg commented on a change in pull request #616:
URL: https://github.com/apache/pulsar-client-go/pull/616#discussion_r706415880



##########
File path: pulsar/consumer_test.go
##########
@@ -1353,6 +1353,107 @@ func TestRLQMultiTopics(t *testing.T) {
        assert.Nil(t, checkMsg)
 }
 
+func TestRLQSpecifiedPartitionTopic(t *testing.T) {
+       topic := newTopicName()
+       testURL := adminURL + "/" + "admin/v2/persistent/public/default/" + 
topic + "/partitions"
+       makeHTTPCall(t, http.MethodPut, testURL, "1")
+
+       normalTopic := "persistent://public/default/" + topic
+       partitionTopic := normalTopic + "-partition-0"
+
+       subName := fmt.Sprintf("sub01-%d", time.Now().Unix())
+       maxRedeliveries := 2
+       N := 100
+       ctx := context.Background()
+
+       client, err := NewClient(ClientOptions{URL: lookupURL})
+       assert.Nil(t, err)
+       defer client.Close()
+
+       // subscribe topic with partition
+       rlqConsumer, err := client.Subscribe(ConsumerOptions{
+               Topic:                       partitionTopic,

Review comment:
       I think the normal topic name should be passed here right?

##########
File path: pulsar/consumer_multitopic.go
##########
@@ -136,7 +136,11 @@ func (c *multiTopicConsumer) AckID(msgID MessageID) {
 }
 
 func (c *multiTopicConsumer) ReconsumeLater(msg Message, delay time.Duration) {
-       names, err := validateTopicNames(msg.Topic())
+       topic := msg.Topic()

Review comment:
       It looks like the issue is related to the individual partitioned topic 
name `my-topic-partition-0` is being configured in the consumer options instead 
of the partitioned name `my-topic`? If the partitioned topic name is passed in 
does this issue still exist?




-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to