-
Notifications
You must be signed in to change notification settings - Fork 14.8k
MINOR: Streams developer guide improvement #21000
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,7 @@ | |
| <li><a class="reference internal" href="#determining-how-many-application-instances-to-run" id="id8">Determining how many application instances to run</a></li> | ||
| </ul> | ||
| </li> | ||
| <li><a class="reference internal" href="#handling-crashes-and-failures" id="id9">Handling crashes and failures</a></li> | ||
| </ul> | ||
| </div> | ||
| <div class="section" id="starting-a-kafka-streams-application"> | ||
|
|
@@ -134,6 +135,22 @@ <h3><a class="toc-backref" href="#id8">Determining how many application instance | |
| <li>Data should be equally distributed across topic partitions. For example, if two topic partitions each have 1 million messages, this is better than a single partition with 2 million messages and none in the other.</li> | ||
| <li>Processing workload should be equally distributed across topic partitions. For example, if the time to process messages varies widely, then it is better to spread the processing-intensive messages across partitions rather than storing these messages within the same partition.</li> | ||
| </ul> | ||
| </div> | ||
| <div class="section" id="handling-crashes-and-failures"> | ||
| <span id="streams-developer-guide-execution-scaling"></span><h2><a class="toc-backref" href="#id9">Handling crashes and failures</a><a class="headerlink" href="#handling-crashes-and-failures" title="Permalink to this headline"></a></h2> | ||
| <p>There are a few things you can do to reduce the likelihood of crashes and failures of your Kafka Streams application. | ||
| <ul class="simple"> | ||
| <li>Kafka Streams has a few configurations that can help with resilience in the face of broker failures. They can be found here: <a class="reference internal" href="config-streams.html#recommended-configuration-parameters-for-resiliency">Recommended configuration parameters for resiliency</a></li> | ||
| <li>Ensure that your application is able to handle errors and failures. This includes things like | ||
| configuring the correct exception handlers to handle errors such as authorization and deserialization errors, | ||
| and using strategies such as dead letter queues to handle "poison pill" records. </li> | ||
| </ul> | ||
| </p> | ||
| <p>If your Kafka Streams application does crash or fail, it will first enter the <code class="docutils literal"><span class="pre">PENDING_ERROR</span></code> state | ||
| to gracefully close all of its existing resources, and then transition into the <code class="docutils literal"><span class="pre">ERROR</span></code> state. | ||
| It is important to note that the <code class="docutils literal"><span class="pre">PENDING_ERROR</span></code> state is not recoverable, and only a | ||
| restart will get the application back to the RUNNING state. | ||
|
||
| </p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
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.
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 is bad writing style to use "here". Text should be written as if it was a book, with no hyperlinks, and the sentence should still make sense w/o any hyperlinks.
So something like:
and just make "configuration guide" the link.