You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/19 03:00:40 UTC

[GitHub] [pulsar-client-go] shohi opened a new issue #288: failed to create consumer with ReceiverQueueSize set to -1

shohi opened a new issue #288:
URL: https://github.com/apache/pulsar-client-go/issues/288


   #### Expected behavior
   
   create the consumer successfully. According to the doc, ReceiverQueueSize set to `-1` only disables prefetching in consumer.
   
   #### Actual behavior
   Panic when creating consumer with the setting.
   
   ```
   panic: makechan: size out of range
   ```
   
   Test code
   ```go
   func TestConsumer_NegativeQueueSize(t *testing.T) {
   	client, err := pulsar.NewClient(pulsar.ClientOptions{
   		URL: "pulsar://localhost:6650",
   	})
   
   	if err != nil {
   		t.FailNow()
   	}
   	defer client.Close()
   
   	consumer, err := client.Subscribe(pulsar.ConsumerOptions{
   		Topic:             "topic",
   		SubscriptionName:  "my-sub",
   		ReceiverQueueSize: -1,
   	})
   	defer func() {
   		if consumer != nil {
   			consumer.Close()
   		}
   	}()
   
   	if err != nil {
   		t.FailNow()
   	}
   }
   ```
   
   #### System configuration
   **Pulsar version**: 2.5.2
   **pulsar-client-go**: latest(861d7af)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy edited a comment on issue #288: failed to create consumer with ReceiverQueueSize set to -1

Posted by GitBox <gi...@apache.org>.
wolfstudy edited a comment on issue #288:
URL: https://github.com/apache/pulsar-client-go/issues/288#issuecomment-646409545


   @shohi Sorry, this comment may be wrong, `receiveQueueSize` is the size of golang channel buffer.  `0` means non-buffer, `>0` means buffered. Can you help fix the issue?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on issue #288: failed to create consumer with ReceiverQueueSize set to -1

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #288:
URL: https://github.com/apache/pulsar-client-go/issues/288#issuecomment-646409545


   @shohi Sorry, this comment may be wrong, `receiveQueueSize` is essentially the size of golang channel buffer.  Can you help fix the issue?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy edited a comment on issue #288: failed to create consumer with ReceiverQueueSize set to -1

Posted by GitBox <gi...@apache.org>.
wolfstudy edited a comment on issue #288:
URL: https://github.com/apache/pulsar-client-go/issues/288#issuecomment-646409545


   @shohi Sorry, this comment may be wrong, `receiveQueueSize` is the size of golang channel buffer.  `0` means non-buffer, `>0` means buffered, `-1` is a disallowed value. Can you help fix the issue?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] shohi commented on issue #288: failed to create consumer with ReceiverQueueSize set to -1

Posted by GitBox <gi...@apache.org>.
shohi commented on issue #288:
URL: https://github.com/apache/pulsar-client-go/issues/288#issuecomment-646410208


   Sure


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy closed issue #288: failed to create consumer with ReceiverQueueSize set to -1

Posted by GitBox <gi...@apache.org>.
wolfstudy closed issue #288:
URL: https://github.com/apache/pulsar-client-go/issues/288


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy edited a comment on issue #288: failed to create consumer with ReceiverQueueSize set to -1

Posted by GitBox <gi...@apache.org>.
wolfstudy edited a comment on issue #288:
URL: https://github.com/apache/pulsar-client-go/issues/288#issuecomment-646409545


   @shohi Sorry, this comment may be wrong, `receiveQueueSize` is the size of golang channel buffer.  Can you help fix the issue?


----------------------------------------------------------------
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:
users@infra.apache.org