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

为什么要将收到的消息转换为string #45

Open
Dong148 opened this issue Jul 7, 2023 · 2 comments
Open

为什么要将收到的消息转换为string #45

Dong148 opened this issue Jul 7, 2023 · 2 comments

Comments

@Dong148
Copy link

Dong148 commented Jul 7, 2023

对于 ConsumeHandle func(key, value string) error
一般从kafka接收的消息都是json,为什么要做类型转换呢

@1426919587
Copy link

对于 ConsumeHandle func(key, value string) error 一般从kafka接收的消息都是json,为什么要做类型转换呢

json也是string也是[]byte

@ChangwangChen
Copy link

go 里面 string 和 []byte 互通的吧

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