Pulsar: could not determine kind of name for C.pulsar_configure_set_negative_ack_redelivery_delay_ms

Created on 16 Apr 2019  Â·  18Comments  Â·  Source: apache/pulsar

Describe the bug
When I upgrade my app to use the latest pulsar 2.3.1, compile report this error:
/home/chris/.gvm/pkgsets/go1.12.1/global/pkg/mod/github.com/apache/pulsar/[email protected]/pulsar/c_consumer.go:101:3: could not determine kind of name for C.pulsar_conf
igure_set_negative_ack_redelivery_delay_ms
/home/chris/.gvm/pkgsets/go1.12.1/global/pkg/mod/github.com/apache/pulsar/[email protected]/pulsar/c_consumer.go:263:2: could not determine kind of name for C.pulsar_cons
umer_negative_acknowledge
/home/chris/.gvm/pkgsets/go1.12.1/global/pkg/mod/github.com/apache/pulsar/[email protected]/pulsar/c_consumer.go:268:2: could not determine kind of name for C.pulsar_cons
umer_negative_acknowledge_id

Screenshots
image

Desktop (please complete the following information):

  • MacOS
  • Ubuntu
componenclient componengo triagweek-44 typbug

Most helpful comment

I got it work via...

# latest commit in the branch 2.3 branch
# https://github.com/apache/pulsar/commits/branch-2.3

# which is: 1f4a836a46483db408e0bf39903215974262d946

# install 2.3.1
 brew install libpulsar  

# get the go-client module
go get github.com/apache/pulsar/pulsar-client-go@1f4a836a46483db408e0bf39903215974262d946

$ go run main.go
2019/05/16 13:21:59.388 c_client.go:68: [info] INFO  | ClientImpl:492 | Closing Pulsar client

All 18 comments

@chrislearn Which tag are you pulling of the Go code? and which version of libpulsar C++ library do you have installed?

It looks like this is the code from master, though the libpulsar library is 2.3.1.

@merlimat I use latest libpulsar C++ library, 2.3.1
I use go module to install go client, but when I try to use go get github.com/apache/pulsar/[email protected] to install v2.3.1, it will report error:
go get github.com/apache/pulsar/[email protected]: unknown revision pulsar-client-go/v2.3.1
So I use this command to install go client from master:
go get github.com/apache/pulsar/pulsar-client-go

The tag is there though.. https://github.com/apache/pulsar/tree/v2.3.1/pulsar-client-go

you can work around by doing:

cd ~/go/src/github.com/apache/pulsar/pulsar-client-go/
git co v2.3.1

@merlimat You mean I need to checkout it manually. It is not supports go module?

I think the problem is you’re trying to fetch a specific tad with go get which I’m not sure it supported (by Go get).

Have you tried to use

$ dep ensure -add github.com/apache/pulsar/pulsar-client-go/[email protected]

Like explained on https://pulsar.apache.org/docs/en/client-libraries-go/

@merlimat go supports version tag in go get.
https://github.com/golang/go/wiki/Modules
My project use go module and I want to change it to use dep.

I encounter the same errors with the client-cpp 2.3.1.
Fixing the pulsar-client-go version with require github.com/apache/pulsar/pulsar-client-go v2.3.1 in the go.mod throw me the same error:

go: errors parsing go.mod:
/home/alessio/Projects/go/src/stream-dns/go.mod:5: invalid module version "v2.3.1": unknown revision pulsar-client-go/v2.3.1

Desktop:

  • Linux
  • arch and ubuntu

@chrislearn @merlimat Do you have any idea how to solve go mod issue mentioned by @NotBad4U ? From official documentation, it never mentions about it, but instead only go get and dep.

Hi @chrislearn @merlimat @NotBad4U
Any update one this issues? We meet the similar problem, especially unknown go modules for Pulsar 2.3.1.
Does anyone use go mod to successfully download/install Pulsar go client?
Thanks very much!

@simonliangnarvar
If the library's version is v1.x.x, I think add a version tag v1.x.x in git repository can let it supports go module.
But if the library's version is v2 or higher, according official documention, we need to change major branch or use subdirectory.
https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher
https://github.com/golang/go/wiki/Modules#semantic-import-versioning
https://golang.org/cmd/go/#hdr-Module_compatibility_and_semantic_versioning

I got it work via...

# latest commit in the branch 2.3 branch
# https://github.com/apache/pulsar/commits/branch-2.3

# which is: 1f4a836a46483db408e0bf39903215974262d946

# install 2.3.1
 brew install libpulsar  

# get the go-client module
go get github.com/apache/pulsar/pulsar-client-go@1f4a836a46483db408e0bf39903215974262d946

$ go run main.go
2019/05/16 13:21:59.388 c_client.go:68: [info] INFO  | ClientImpl:492 | Closing Pulsar client

Hi :smile:
any update one this issues?

+1

I solved the problem by removing "HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH = C.SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH // specifies a variable to control whether mouse and touch events are to be treated together or separately" in the file :
C:\Users\lbaha\go\src\github.com\veandco\go-sdl2\sdl\hint.go

Can you explain the link between HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH and the compilation errors: could not determine kind of name for C.pulsar_... @laurent75019 ? :thinking:

Hello ! Any update on this one ?

@NotBad4U can you provide more info for the issue, e.g:

  • OS: Mac OS or Linux
  • CPP Client Version:
  • CGO client version:
  • Go Version:
  • so on..

This information can help me reproduce the problem better, thanks.

@NotBad4U Any update on this issue?

Was this page helpful?
0 / 5 - 0 ratings