Skip to content

Conversation

@samarth-ksolves
Copy link
Contributor

@samarth-ksolves samarth-ksolves commented Sep 25, 2025

This PR updated the running-app.html to:

  1. Add missing documentation for Kafka Streams listeners and callbacks.
  2. Current docs do not explain or list the available listeners, making
    it hard for developers (especially beginners) to use them.
  3. Introduce a new section in Kafka Streams docs covering all supported
    listeners/callbacks like uncaught-exception-handler,
    state-restore-listener, state-listener, etc.
  4. Provide short explanations and practical use cases for each
    listener/callback.

<div class="pagination">
<ul>
<li>
<b>UncaughtExceptionHandler</b><br/>
Copy link
Member

@mjsax mjsax Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<b>UncaughtExceptionHandler</b><br/>
<b>StreamsUncaughtExceptionHandler:</b><br/>

</li>

<li>
<b>State Listener</b><br/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<b>State Listener</b><br/>
<b>State Listener:</b><br/>

</li>

<li>
<b>Global State Restore Listener</b><br/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<b>Global State Restore Listener</b><br/>
<b>Global State Restore Listener:</b><br/>

</li>

<li>
<b>ProductionExceptionHandler</b> and <b>DeserializationExceptionHandler</b><br/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<b>ProductionExceptionHandler</b> and <b>DeserializationExceptionHandler</b><br/>
<b>ProductionExceptionHandler</b> and <b>DeserializationExceptionHandler</b>:<br/>

</li>

<li>
<b>ConsumerRebalanceListener</b><br/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not supported by Kafka Streams, but only by the KafkaConsumer, as the text actually says. Don't think it belongs into the KS part of the docs.


<pre>
<code class="language-java">
// Handle uncaught exceptions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Handle uncaught exceptions
// Handle uncaught exceptions

Copy link
Member

@mjsax mjsax Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies to all lines of the code example. To avoid weird formatting, we need to remove all these trailing spaces, otherwise they are rendered in the docs, and instead of this:

Example usage of exception and state restore listeners:

// Handle uncaught exceptions
...

we would get

Example usage of exception and state restore listeners:

                    // Handle uncaught exceptions
                    ...

What is rather weird.

@ezhou413
Copy link
Contributor

ezhou413 commented Nov 27, 2025

Hi @samarth-ksolves, are you still working on this? I am working on something similar in #21000, and think your changes would be a good addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants