Skip to content

chore: add kafka type in oss#3884

Merged
Sarthak160 merged 1 commit intomainfrom
kafka-oss
Feb 28, 2026
Merged

chore: add kafka type in oss#3884
Sarthak160 merged 1 commit intomainfrom
kafka-oss

Conversation

@Sarthak160
Copy link
Copy Markdown
Member

@Sarthak160 Sarthak160 commented Feb 27, 2026

Describe the changes that are made

This pull request adds support for Kafka as a new integration and mock type throughout the codebase. The changes introduce a new KafkaSchema struct, update the mock specification to include Kafka request and response payloads, and extend the YAML encode/decode logic to handle Kafka mocks.

Kafka integration and mock support:

  • Added KAFKA as a new IntegrationType in integrations.go and as a new Kind in mock.go, enabling Kafka as a recognized integration and mock type. [1] [2]
  • Extended the MockSpec struct to include KafkaRequests and KafkaResponses fields, allowing mocks to store Kafka-specific payloads.
  • Introduced a new KafkaSchema struct in models/redis.go to define the schema for Kafka mocks, including metadata, request/response bins, and timestamp fields.

YAML encode/decode enhancements:

  • Updated the EncodeMock function to handle Kafka mocks by marshaling the new KafkaSchema into YAML, with appropriate error handling and logging.
  • Updated the DecodeMocks function to decode Kafka mocks from YAML into the new KafkaSchema and populate the MockSpec accordingly.

Links & References

Closes: #[issue number that will be closed through this PR]

  • NA (if very small change like typo, linting, etc.)

🔗 Related PRs

  • NA

🐞 Related Issues

  • NA

📄 Related Documents

  • NA

What type of PR is this? (check all applicable)

  • 📦 Chore
  • 🍕 Feature
  • 🐞 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🔁 CI
  • ⏩ Revert

Added e2e test pipeline?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added comments for hard-to-understand areas?

  • 👍 yes
  • 🙅 no, because the code is self-explanatory

Added to documentation?

  • 📜 README.md
  • 📓 Wiki
  • 🙅 no documentation needed

Are there any sample code or steps to test the changes?

  • 👍 yes, mentioned below
  • 🙅 no, because it is not needed

Self Review done?

  • ✅ yes
  • ❌ no, because I need help

Any relevant screenshots, recordings or logs?

  • NA

🧠 Semantics for PR Title & Branch Name

Please ensure your PR title and branch name follow the Keploy semantics:

📌 PR Semantics Guide
📌 Branch Semantics Guide

Examples:

  • PR Title: fix: patch MongoDB document update bug
  • Branch Name: feat/#1-login-flow (You may skip mentioning the issue number in the branch name if the change is small and the PR description clearly explains it.)

Additional checklist:

Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>
@Sarthak160 Sarthak160 merged commit 218367c into main Feb 28, 2026
120 of 121 checks passed
@Sarthak160 Sarthak160 deleted the kafka-oss branch February 28, 2026 08:33
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants