pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] tfhappy opened a new issue #3455: Acktimeout cannot be set in Go Client
Date Mon, 28 Jan 2019 04:39:20 GMT
tfhappy opened a new issue #3455: Acktimeout cannot be set in Go Client
URL: https://github.com/apache/pulsar/issues/3455
 
 
   **Describe the bug**
   When I create a consumer and specify acktimeout, I can't start it.
   **To Reproduce**
   ```
   package main
   
   import (
   	"context"
   	"log"
   	"time"
   	"fmt"
   	"github.com/apache/pulsar/pulsar-client-go/pulsar"
   )
   
   func main() {
   	// Instantiate a Pulsar client
   	client, err := pulsar.NewClient(pulsar.ClientOptions{
   		URL:  "pulsar://pulsar.int.mechatim.com:6650",
   	})
   
   	if err != nil {
   		log.Fatal(err)
   	}
   
   	// Use the client object to instantiate a consumer
   	consumer, err := client.Subscribe(pulsar.ConsumerOptions{
   		Topics: []string{
   			"my-topic",
   		},
   		SubscriptionName: "sub-1",
   		Type:             pulsar.Exclusive,
   		AckTimeout:       time.Second,
   	})
   
   	if err != nil {
   		log.Fatal(err)
   	}
   
   	defer consumer.Close()
   
   	ctx := context.Background()
   
   	// Listen indefinitely on the topic
   	for {
   		msg, err := consumer.Receive(ctx)
   		if err != nil {
   			log.Fatal(err)
   		}
   
   		// Do something with the message
   		fmt.Printf("[INFO] Message value: %s\n", string(msg.Payload()))
   
   		consumer.Ack(msg)
   	}
   }
   
   ```
   
   **Expected behavior**
   create a consumer
   **Screenshots**
   ```
   terminate called after throwing an instance of 'char const*'
   SIGABRT: abort
   PC=0x7fc8a030ae97 m=0 sigcode=18446744073709551610
   
   goroutine 0 [idle]:
   runtime: unknown pc 0x7fc8a030ae97
   stack: frame={sp:0x7ffdf87252c0, fp:0x0} stack=[0x7ffdf7f265d8,0x7ffdf8725600)
   00007ffdf87251c0:  0000000000000000  0000000000000000 
   00007ffdf87251d0:  0000000000000000  0000000000000000 
   00007ffdf87251e0:  0000000000000000  0000000000000000 
   00007ffdf87251f0:  000000ff00000000  0000ff0000000000 
   00007ffdf8725200:  0000000000000000  0000000000000000 
   00007ffdf8725210:  0000000000000000  00007fc89fbc9c80 
   00007ffdf8725220:  4000000000000000  0000000000000000 
   00007ffdf8725230:  0000000000000000  0000000000000000 
   00007ffdf8725240:  0000000000000000  0000000000000000 
   00007ffdf8725250:  00007ffdf87254e0  00007ffdf87254e8 
   00007ffdf8725260:  000000c4200220f0  0000000000000049 
   00007ffdf8725270:  000000c4200164e0  000000000000001f 
   00007ffdf8725280:  000000c420016500  0000000000000013 
   00007ffdf8725290:  000000c420016520  0000000000000013 
   00007ffdf87252a0:  000000c420016540  0000000000000016 
   00007ffdf87252b0:  0000000000000000  0000000000456d31 <runtime.goexit+1> 
   00007ffdf87252c0: <0000000000000000  0000000000000000 
   00007ffdf87252d0:  0000000000000000  0000000000000000 
   00007ffdf87252e0:  000000c400000000  0000000000000049 
   00007ffdf87252f0:  6e6f632072616863  00000000002a7473 
   00007ffdf8725300:  000000c420016500  0000000000000013 
   00007ffdf8725310:  000000c420016520  0000000000000013 
   00007ffdf8725320:  000000c420016540  0000000000000016 
   00007ffdf8725330:  0000000000000000  0000000000456d31 <runtime.goexit+1> 
   00007ffdf8725340:  fffffffe7fffffff  ffffffffffffffff 
   ......
   ```
   
   **Desktop:**
    - OS: Ubuntu 18.04.1 LTS 
    - version:  2.2.1
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Mime
View raw message