Skip to content

Add kafka consumer implementation using segmentio#411

Closed
noxymon-mekari wants to merge 10 commits intoMelkeydev:mainfrom
noxymon-mekari:main
Closed

Add kafka consumer implementation using segmentio#411
noxymon-mekari wants to merge 10 commits intoMelkeydev:mainfrom
noxymon-mekari:main

Conversation

@noxymon-mekari
Copy link

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Problem/Feature

This pull request introduces a Kafka integration feature to the project setup, allowing users to add Kafka consumer functionality when creating a new project. The changes include updates to the project creation flow, templates for Kafka-related files, and support for configuring Kafka settings via environment variables.

Description of Changes:

Kafka Integration Feature:

  • Add Kafka as an Advanced Feature Option:

    • Introduced "Kafka" as a new option in the AllowedAdvancedFeatures list and the advanced feature selection step. This allows users to enable Kafka integration during project creation.
  • Kafka Consumer Implementation:

    • Added templates for Kafka consumer-related files (consumer.go, consumer_test.go, main.go) and an .env template for Kafka configuration. These templates are embedded in the project and used to generate necessary files.
    • Implemented a new method CreateKafkaFiles to generate Kafka-related files and directories, including a consumer binary setup.
  • Environment Variable Support for Kafka:

    • Updated the .env file generation logic to include Kafka-specific configurations, such as brokers, group ID, and topic.

Project Creation Flow Enhancements:

  • Feature Flag Handling:

    • Improved the handling of feature flags in the create command, allowing them to be processed independently of the --advanced flag.
  • Interactive Messages for Kafka:

    • Added user-facing tips and instructions for setting up and running the Kafka consumer in the project creation summary.

These changes enhance the flexibility and functionality of the project creation process by enabling Kafka integration as an advanced feature.

Checklist

@Melkeydev
Copy link
Owner

Hey I want to start by thanking you for the PR.
Looking over, I am not sure if I want go-blueprint to support a Kafka implementation. I feel this could be out of scope to the original purpose of go-blueprint

@noxymon-mekari
Copy link
Author

Hey I want to start by thanking you for the PR. Looking over, I am not sure if I want go-blueprint to support a Kafka implementation. I feel this could be out of scope to the original purpose of go-blueprint

Hi, thanks for warmth welcome !
That's fine for me. This PR intended to fulfil our need in mekari.com internal deployment.

as per your concern,
let me create new repo, inspired by this coold & awesome repo then.

Thanks alot @Melkeydev !

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.

2 participants