Skip to content

Commit 40c3f31

Browse files
authored
MINOR: Improve Streams docs for transitory states (#20980)
This PR improves Kafka Streams documentation for transitory states. It is not currently clear that the `PENDING_SHUTDOWN` and `PENDING_ERROR` states are not recoverable, and that a restart is required to get back to running. Reviewers: Matthias J. Sax <[email protected]>
1 parent cdc4019 commit 40c3f31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ public class KafkaStreams implements AutoCloseable {
241241
* Any state except NOT_RUNNING, PENDING_ERROR or ERROR can go to PENDING_SHUTDOWN (whenever close is called)
242242
* </li>
243243
* <li>
244+
* PENDING_SHUTDOWN and PENDING_ERROR are transitory states where the Streams application gracefully closes
245+
* its existing resources before transitioning into their corresponding terminal states. These states are
246+
* not recoverable, and only a restart would get an application back to the RUNNING state.
247+
* </li>
248+
* <li>
244249
* Of special importance: If the global stream thread dies, or all stream threads die (or both) then
245250
* the instance will be in the ERROR state. The user will not need to close it.
246251
* </li>

0 commit comments

Comments
 (0)