feat(gateways): Iggy Kafka bridge core — SDK client and stream/topic mapping - #4043
Open
ryerraguntla wants to merge 15 commits into
Open
feat(gateways): Iggy Kafka bridge core — SDK client and stream/topic mapping#4043ryerraguntla wants to merge 15 commits into
ryerraguntla wants to merge 15 commits into
Conversation
…ays)/3533-iggy-bridge-core
Contributor
Author
|
/author |
ryerraguntla
marked this pull request as draft
September 3, 2026 02:40
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4043 +/- ##
=============================================
- Coverage 85.90% 57.67% -28.23%
Complexity 1431 1431
=============================================
Files 1244 1243 -1
Lines 192435 157562 -34873
Branches 158133 123259 -34874
=============================================
- Hits 165307 90872 -74435
- Misses 23037 62768 +39731
+ Partials 4091 3922 -169
🚀 New features to boost your workflow:
|
Contributor
|
please dont include #PR_NUMBER in PR title because it'd look weird after merge, e.g. |
…om/ryerraguntla/iggy into feat(gateways)/3533-iggy-bridge-core
ryerraguntla
marked this pull request as ready for review
September 7, 2026 10:27
Contributor
Author
|
@krishvishal - I am back from my travel and ready with PR #4043 for the Kafka gateway. |
Contributor
Author
|
Please review |
Member
|
@ryerraguntla I'll review it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rationale
Phase 1 of the Kafka → Iggy bridge rollout needs a shared
IggyBridgeso later API handlers (#3535 Produce, #3536 Fetch, #3537 ListOffsets) talk to Iggy through one client, one topic map, and one error map.#3421 landed wire framing + stub responses with no Iggy backend. This PR lands Layer 3 (
gateways/kafka/src/bridge/) as a library: connect, map, provision, watermark, Kafka error codes. Produce/Fetch/ListOffsets dispatch still stubs. Wiring is the follow-on issues, not this one.What changed?
New module under
iggy-gateway-kafka:IggyBridge::connect/closeinsrc/bridge/iggy_bridge.rsensure_stream_and_topic(kafka_topic, partition_count)src/bridge/topic_map.rs+IggyBridgeConfig::from_envSecretStringcredentialssrc/bridge/config.rs(IGGY_KAFKA_IGGY_*)IggyBridge::high_watermark(see signature note)BridgeError::to_kafka_error_codeinsrc/bridge/error.rstests/bridge_iggy_integration_tests.rsLimits and Future PRs (still #3533 out of scope)
high_watermark→ Kafka gateway: Kafka ListOffsets API (key 2) — earliest/latest via Iggy high watermark #3537IggyBridgeConfig::from_envis implemented and env-allowlisted inmain.rs, butmaindoes not callIggyBridge::connectyet. Live Kafka handlers still stubs.IggyBridge::connectreturnsErr, not a panic. No Kafka handler calls the bridge yet.Mapping / config (README)
Default: Kafka topic
orders→ Iggy streamIGGY_KAFKA_IGGY_STREAM(defaultkafka), topicorders.Overrides: TOML via
IGGY_KAFKA_TOPIC_MAP_PATH. Filedefault_streamwins over the env var when both set.Credentials: fluent TCP builder +
SecretString, notiggy://user:pass@host(that URI splits on@/:).ensure_stream_and_topicusesIdentifier::namedso all-digit Kafka names (2024) stay names, not numeric Iggy IDs.Existing topic with a different
partition_count→BridgeError::PartitionCountMismatch→ KafkaINVALID_PARTITIONS(37).Error map
UNKNOWN_TOPIC_OR_PARTITION(3)TOPIC_AUTHORIZATION_FAILED(29)NOT_LEADER_OR_FOLLOWER(6), retriableINVALID_PARTITIONS(37)UNKNOWN_SERVER_ERROR(-1)Acceptance criteria (#3533)
tests/bridge_iggy_integration_tests.rs(realiggy-serverharness, not a mock)ensure_stream_and_topicidempotent on repeated calls (incl. numeric topic name2024)IGGY_KAFKA_*config (gateways/kafka/README.md)Also covered beyond the issue checkbox list: high-watermark empty vs 3 produces; special password
p@ss:word; connect to an unbound port returnsErr.Out of scope (issue)
docs/BRIDGE_MAPPING.md(partition / group mapping) — still open onSCOPE.md, not this issueTest plan