Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot build example #1341

Open
RightFS opened this issue Nov 20, 2024 · 6 comments
Open

cannot build example #1341

RightFS opened this issue Nov 20, 2024 · 6 comments

Comments

@RightFS
Copy link

RightFS commented Nov 20, 2024

Description

image

go get github.com/confluentinc/confluent-kafka-go/v2/kafka
go: added github.com/confluentinc/confluent-kafka-go/v2 v2.6.1
go build main.go

command-line-arguments

.\main.go:9:18: undefined: kafka.NewProducer
.\main.go:9:37: undefined: kafka.ConfigMap
.\main.go:20:16: undefined: kafka.Message
.\main.go:33:20: undefined: kafka.Message
.\main.go:34:26: undefined: kafka.TopicPartition
.\main.go:34:73: undefined: kafka.PartitionAny

How to reproduce

go mod init kakaka
go get github.com/confluentinc/confluent-kafka-go/v2/kafka
go build main.go

Windows 11,
Go 1.23.3

@RightFS
Copy link
Author

RightFS commented Nov 20, 2024

image
this mod is installed rightly, and I can brwoser the files with ctrl + click in VS Code

@Seaiii
Copy link

Seaiii commented Nov 20, 2024

I have the same problem, prompting undefined:. But my files are introduced fine, I can ctrl+mouse click into the
image
image
image

@RightFS
Copy link
Author

RightFS commented Nov 20, 2024

sarama work well , bye-bye confluent-kafka-go

@Seaiii
Copy link

Seaiii commented Nov 20, 2024

sarama work well , bye-bye confluent-kafka-go

Have you solved it?

@SiwakornSitti
Copy link

SiwakornSitti commented Nov 25, 2024

I faced the same thing, any solution

@RightFS
Copy link
Author

RightFS commented Nov 26, 2024

I faced the same thing, any solution

just use IBM/sarama instead of this package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants