mgtoxd opened a new issue #776:
URL: https://github.com/apache/rocketmq-client-go/issues/776


   My rocketmq running well under the Java code, when I try go-client I met a 
mistake I couldn't solve
   
   I see this:
   ```shell
   unexpected fault address 0x0
   fatal error: fault
   [signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x46075f]
   
   ```
   [All error 
messages](https://gist.github.com/mgtoxd/55b4f604e5a23ad9465a2e33c6929b42) 
   
   The code I ran was very simple
   ```go
   package main
   
   import (
        "context"
        "fmt"
        "github.com/apache/rocketmq-client-go/v2"
        "github.com/apache/rocketmq-client-go/v2/primitive"
        "github.com/apache/rocketmq-client-go/v2/producer"
   )
   
   func main() {
        p, err := rocketmq.NewProducer(
                producer.WithNameServer([]string{"127.0.0.1:9876"}),
                
//producer.WithNsResolver(primitive.NewPassthroughResolver(endPoint)),
                producer.WithRetry(2),
                producer.WithGroupName("eee"),
        )
   
        if err != nil {
                fmt.Println("1:-", err.Error())
        }
        err = p.Start()
        if err != nil {
                fmt.Println("2:-", err.Error())
        }
        err = p.SendAsync(context.Background(),
                func(ctx context.Context, result *primitive.SendResult, e 
error) {
                        if e != nil {
                                fmt.Printf("receive message error: %s\n", err)
                        } else {
                                fmt.Printf("send message success: result=%s\n", 
result.String())
                        }
                }, primitive.NewMessage("test", []byte("Hello RocketMQ Go 
Client!")))
   
        if err != nil {
                fmt.Printf("send message error: %s\n", err)
        }
        if err != nil {
                fmt.Println("3:-", err.Error())
        }
   }
   
   ```
   environment:
     OS: Arch Linux x86_64
     client version: 2.1.0
     RocketMQ version: 4.9.2
    
   
   I don't know how to fix it
   
   
   


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