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 2019/12/16 12:53:32 UTC
[GitHub] [pulsar] wolfstudy edited a comment on issue #5695: Go: Segfault on
messageId serialize after getting it from producer
wolfstudy edited a comment on issue #5695: Go: Segfault on messageId serialize after getting it from producer
URL: https://github.com/apache/pulsar/issues/5695#issuecomment-566044885
Thanks @lspgn, Unfortunately, I can't reproduce the issue in my local.
Use code as follows:
```
package main
import (
"context"
"fmt"
log "github.com/apache/pulsar/pulsar-client-go/logutil"
"github.com/apache/pulsar/pulsar-client-go/pulsar"
)
func main() {
client, err := pulsar.NewClient(pulsar.ClientOptions{
URL: "pulsar://localhost:6650",
IOThreads: 5,
})
if err != nil {
log.Fatal(err)
}
defer client.Close()
producer, err := client.CreateProducer(pulsar.ProducerOptions{
Topic: "topic-1",
})
if err != nil {
log.Fatal(err)
}
defer producer.Close()
ctx := context.Background()
for i := 0; i < 10000000; i++ {
msg := pulsar.ProducerMessage{
Payload: []byte(fmt.Sprintf("hello-%d", i)),
}
msgID, err := producer.SendAndGetMsgID(ctx, msg)
if err != nil {
log.Fatal(err)
}
fmt.Printf("the %s successfully published with id %v\n", string(msg.Payload), msgID.Serialize())
}
}
```
The broker version:
- 2.4.1
- 2.4.2
- 2.5.0
The client version:
- github.com/apache/pulsar/pulsar-client-go v0.0.0-20191214024039-b52449a6604c
Can you provide a stable reproduce code?
----------------------------------------------------------------
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
With regards,
Apache Git Services