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

Add Kafka msgpack support #440

Merged
merged 4 commits into from
Dec 24, 2021
Merged

Conversation

zerosoul13
Copy link
Contributor

@zerosoul13 zerosoul13 commented Dec 8, 2021

Hello,

When I tried to integrate carbon-relay-ng through Kafka I found that the format produced by carbon-relay-ng is not compatible with go-carbon.

This commit adds support for msgpack format so that, if we (the users) decide to use carbon-relay-ng and Kafka, it works out of the box with go-carbon.

Related issues:

@deniszh
Copy link
Member

deniszh commented Dec 8, 2021

That's great addition, thanks, @zerosoul13 !
Could you please update vendor directory using go mod vendor ? Thanks!

- kafka.go InitPrometheus function signature update on receiver and paramater as these are unused
- msgpack.go update string compare on metric name from len(d.Name) to d.Name == "" as proposed by linter
@deniszh
Copy link
Member

deniszh commented Dec 9, 2021

Great, it's green now. It's simple enough to merge, but I would wait for day, maybe someone else want to review.

@bom-d-van
Copy link
Member

bom-d-van commented Dec 9, 2021

hi @zerosoul13 , it seems the new protocol isn't handled in Kafka.worker?

@zerosoul13
Copy link
Contributor Author

zerosoul13 commented Dec 13, 2021

hi @zerosoul13 , it seems the new protocol isn't handled in Kafka.worker?

The missing line has been added.

@deniszh
Copy link
Member

deniszh commented Dec 17, 2021

LGTM. What do you think, @bom-d-van ?

@zerosoul13 - as far as I understand you didn't test it in prod, but you had similar patch implemented, as you discussed in #288 (comment) ?

@zerosoul13
Copy link
Contributor Author

zerosoul13 commented Dec 17, 2021

@deniszh I tested this patch on a test environment. I was able to consume from a specific Kafka partition without any issues

@bom-d-van
Copy link
Member

bom-d-van commented Dec 18, 2021

hi yeah, it lgtm as well. thanks for the addition.

@deniszh deniszh merged commit b80dfd5 into go-graphite:master Dec 24, 2021
@zerosoul13 zerosoul13 deleted the msgpackSupport branch December 24, 2021 16:18
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

Successfully merging this pull request may close these issues.

None yet

3 participants