private boolean isFatalException(final Exception exception) {
        final boolean securityException = exception instanceof AuthenticationException ||
            exception instanceof AuthorizationException ||
            exception instanceof SecurityDisabledException;

        final boolean communicationException = exception instanceof InvalidTopicException ||
            exception instanceof UnknownServerException ||
            exception instanceof SerializationException ||
            exception instanceof OffsetMetadataTooLarge ||
            exception instanceof IllegalStateException;

        return securityException || communicationException;
    }
The `TimeoutException` with root cause `UnknownTopicOrPartitionException` is considered as non-retriable
(despite `TimeoutException` being a subclass of `RetriableException`, this particular case is explicitly excluded).
streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordCollectorImpl.java