diff --git a/stage_descriptions/consuming-messages-01_gs0.md b/stage_descriptions/consuming-messages-01_gs0.md index 20403af..a0f68b3 100644 --- a/stage_descriptions/consuming-messages-01_gs0.md +++ b/stage_descriptions/consuming-messages-01_gs0.md @@ -1,10 +1,15 @@ In this stage, you'll add an entry for the `Fetch` API to the APIVersions response. -🚧 **We're still working on instructions for this stage**. You can find notes on how the tester works below. +### The Fetch API -In the meantime, please use -[this link](https://forum.codecrafters.io/new-topic?category=Challenges&tags=challenge%3Akafka&title=Question+about+gs0%3A+Include+Fetch+in+APIVersions&body=%3Cyour+question+here%3E) -to ask questions on the forum. +The [Fetch API](https://kafka.apache.org/protocol#The_Messages_Fetch) (API key `1`) is used to fetch messages from a Kafka topic. + +We've created an interactive protocol inspector for the request & response structures for `Fetch`: + +- 🔎 [Fetch Request (v16)](https://binspec.org/kafka-fetch-request-v16) +- 🔎 [Fetch Response (v16)](https://binspec.org/kafka-fetch-response-v16) + +In this stage, you'll only need to add an entry for the `Fetch` API to the APIVersions response you implemented in earlier stages. We'll get to responding to `Fetch` requests in later stages. ### Tests @@ -26,6 +31,6 @@ The tester will validate that: ### Notes -- You don't have to implement support for the `Fetch` request in this stage. We'll get to this in later stages. -- You'll still need to include the entry for `APIVersions` in your response to pass the previous stage. +- You don't have to implement support for handling `Fetch` requests in this stage. We'll get to this in later stages. +- You'll still need to include the entry for `APIVersions` in your response to pass earlier stages. - The `MaxVersion` for the `Fetch` and `APIVersions` are different. For `APIVersions`, it is 4. For `Fetch`, it is 16. diff --git a/stage_descriptions/consuming-messages-02_dh6.md b/stage_descriptions/consuming-messages-02_dh6.md index b413300..d358007 100644 --- a/stage_descriptions/consuming-messages-02_dh6.md +++ b/stage_descriptions/consuming-messages-02_dh6.md @@ -1,10 +1,15 @@ -In this stage, you'll implement the Fetch response for a Fetch request with no topics. +In this stage, you'll implement the response for a `Fetch` request with no topics. -🚧 **We're still working on instructions for this stage**. You can find notes on how the tester works below. +### Fetch API response for no topics -In the meantime, please use -[this link](https://forum.codecrafters.io/new-topic?category=Challenges&tags=challenge%3Akafka&title=Question+about+dh6%3A+Fetch+with+no+topics&body=%3Cyour+question+here%3E) -to ask questions on the forum. +A `Fetch` request includes a list of topics to fetch messages from. If the request contains an empty list of topics, the `responses` field in the response will be an empty array. + +Here are interactive visualizations of what the `Fetch` request & response will look like when the request contains an empty list of topics: + +- 🔎 [Fetch Request (v17) with no topics](https://binspec.org/kafka-fetch-request-v17-no-topics) +- 🔎 [Fetch Response (v17) with no topics](https://binspec.org/kafka-fetch-response-v17-no-topics) + +In this stage, you'll need to implement the response for a `Fetch` request with an empty list of topics. We'll get to handling `Fetch` requests with topics in later stages. ### Tests @@ -36,4 +41,4 @@ The tester will validate that: - You don't need to parse the fields in the `Fetch` request in this stage, we'll get to this in later stages. - The official docs for the `Fetch` request can be found [here](https://kafka.apache.org/protocol.html#The_Messages_Fetch). Make sure -to scroll down to the "Fetch Response (Version: 16)" section. \ No newline at end of file + to scroll down to the "Fetch Response (Version: 16)" section.