[GitHub] [pulsar] wolfstudy commented on issue #5695: Go: Segfault on messageId serialize after getting it from producer

2019-12-16 Thread GitBox
wolfstudy commented on issue #5695: Go: Segfault on messageId serialize after 
getting it from producer
URL: https://github.com/apache/pulsar/issues/5695#issuecomment-566360406
 
 
   OK,  thanks @lspgn 
   
   > But I also installed the deb dev library and ran the go program from the 
Linux: it is working without issues.
   
   So, we can ensure there is no problem with the implementation of this 
`SendAndGetMsgID `, right?
   
   > So it's likely the libpulsar lib on Mac OS. :(
   
   I agree with you, maybe we can change the way of build cpp lib:
   
   ```
   cd pulsar-client-cpp
   cmake . -DBUILD_TESTS=OFF
   make -j12 && make install
   ```


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


With regards,
Apache Git Services


[GitHub] [pulsar] wolfstudy commented on issue #5695: Go: Segfault on messageId serialize after getting it from producer

2019-12-16 Thread GitBox
wolfstudy commented 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 < 1000; 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


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


With regards,
Apache Git Services


[GitHub] [pulsar] wolfstudy commented on issue #5695: Go: Segfault on messageId serialize after getting it from producer

2019-12-02 Thread GitBox
wolfstudy commented on issue #5695: Go: Segfault on messageId serialize after 
getting it from producer
URL: https://github.com/apache/pulsar/issues/5695#issuecomment-560982931
 
 
   @lspgn will close the issue if `sendWithMsgID` example does not solve your 
problem, please reopen or let me know, thanks.


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


With regards,
Apache Git Services


[GitHub] [pulsar] wolfstudy commented on issue #5695: Go: Segfault on messageId serialize after getting it from producer

2019-11-26 Thread GitBox
wolfstudy commented on issue #5695: Go: Segfault on messageId serialize after 
getting it from producer
URL: https://github.com/apache/pulsar/issues/5695#issuecomment-558917988
 
 
   @lspgn Could you please provide your msg struct content? In here, there is 
an example about sendWithMsgID, please use it as a reference : 
[example-SendWithMsgID](https://github.com/apache/pulsar/blob/master/pulsar-client-go/examples/sendWithMsgID/producer.go#L54)


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


With regards,
Apache Git Services