前段时间在pulsar-client-go社区里看到这么一个issue:1234567891011121314151617181920212223242526import"github.com/apache/pulsar-client-go/pulsar"client, err := pulsar.NewClient(pulsar.ClientOptions{URL:"pulsar://localhost:6650",})iferr !=nil{log.Fatal(err)}consumer, err := client.Subscribe(pulsar.ConsumerOptions{Topic:"persistent://public/default/mq-topic-1",SubscriptionName:"sub-1",Type: pulsar.Shared,ReceiverQueueSize:0,})iferr !=nil{log.Fatal(err)}// 小于等于 0 时会设置为 1000const(defaultReceiverQueueSize =1000)ifoptions.ReceiverQueueSize <=0{options.Receive
...
继续阅读
(37)