-
Notifications
You must be signed in to change notification settings - Fork 350
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
feat: Added kafka service #1565
Conversation
Update: I have added initial connectors to kafka connect, but they don't seem to persist when i restart kafka connect, not sure why. |
Okay, I figured it out, you could just pass the connectors to the start command |
Take a look at https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/misc/apache-kafka.nix. You should be able to reuse large parts of this, particularly the config/settings handling, and ideally keep a similar interface. |
Also added defaults to run in kraft mode
Hey @sandydoo thanks for the feedback! I probably also need to create settings for kafka connect. I would also like to have some kind of readiness probe for kafka. TODO:
|
That's the right approach. @Alexnortung, is there a basic test we could add for this to make sure it launches? I'm not familiar with Kafka, but maybe a ping/healthcheck/queue-unqueue type of thing. See the |
Hi @sandydoo I have Added settings to kafka connect and added a test for kafka. |
@@ -0,0 +1,3 @@ | |||
set -e | |||
|
|||
kafka-topics.sh --list --bootstrap-server localhost:9092 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does kafka-topics.sh
come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's part of the apacheKafka package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you prefer we could probably also do a curl
since the script is probably just calling an endpoint in kafka
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah let's do just curl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, after looking at the docs, it looks like it is only kafka connect which got a REST API, not Kafka.
Is there any issues in using their own client?
Am I missing something since the github actions are failing? |
some of them fail, but you'll see kafka being run in the test action |
I have now also added readiness probes for kafka and kafka connect. I have also added kafka as a dependency to kafka connect, so that kafka connect doesn't fail to start if kafka is not started correctly or is using more time than usual. |
Here is a rough implementation of a kafka service for devenv.
I think there are definetely place for configuration options. but I am not sure how we can implement this properly. So feedback would be appreciated :)
closes #1563