Skip to content

KAFKA-16448: Add ProcessingExceptionHandler in Streams configuration#16092

Merged
cadonna merged 17 commits intoapache:trunkfrom
loicgreffier:KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig
May 30, 2024
Merged

KAFKA-16448: Add ProcessingExceptionHandler in Streams configuration#16092
cadonna merged 17 commits intoapache:trunkfrom
loicgreffier:KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig

Conversation

@loicgreffier
Copy link
Copy Markdown
Contributor

@loicgreffier loicgreffier commented May 27, 2024

This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing.

This PR brings ProcessingExceptionHandler in Streams configuration.

Jira: https://issues.apache.org/jira/browse/KAFKA-16448.

Contributors

@Dabz
@sebastienviale
@loicgreffier

Depends On

#16090

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

loicgreffier and others added 2 commits May 27, 2024 17:06
…ions

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>
Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>
…ions

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>
loicgreffier and others added 3 commits May 28, 2024 19:25
Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>
Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>
Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>
@gharris1727 gharris1727 added streams kip Requires or implements a KIP labels May 28, 2024
Copy link
Copy Markdown
Member

@cadonna cadonna left a comment

Choose a reason for hiding this comment

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

@loicgreffier Thanks for the PR!

Here my comment.

Since today is feature freeze, it would be great if you could make the changes as soon as possible.

Comment on lines +936 to +945
.define(PROCESSING_EXCEPTION_HANDLER_CLASS_CONFIG,
Type.CLASS,
LogAndFailProcessingExceptionHandler.class.getName(),
Importance.MEDIUM,
PROCESSING_EXCEPTION_HANDLER_CLASS_DOC)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please add unit tests in StreamsConfigTest?
I think you need the following unit tests:

  • One where config is not set to verify the default value
  • One where the config is set and you get the correct instance from processingExceptionHandler().

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hi,
It is done !

sebastienviale and others added 6 commits May 29, 2024 10:15
…ndler

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: loicgreffier <loic.greffier@michelin.com>
…ndler

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: loicgreffier <loic.greffier@michelin.com>
…fig' of https://github.com/loicgreffier/kafka into KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig
…fig' of https://github.com/loicgreffier/kafka into KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: loicgreffier <loic.greffier@michelin.com>
…fig' of https://github.com/loicgreffier/kafka into KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig
…eptionHandler

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: loicgreffier <loic.greffier@michelin.com>
Copy link
Copy Markdown
Member

@cadonna cadonna left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, @loicgreffier and @sebastienviale!

After addressing my comment, I will approve and merge this PR.

@Test
public void testInvalidProcessingExceptionHandler() {
props.put(StreamsConfig.PROCESSING_EXCEPTION_HANDLER_CLASS_CONFIG, "org.apache.kafka.streams.errors.InvalidProcessingExceptionHandler");
assertThrows(ConfigException.class, () -> new StreamsConfig(props));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please also verify the message?

Suggested change
assertThrows(ConfigException.class, () -> new StreamsConfig(props));
final Exception exception = assertThrows(ConfigException.class, () -> new StreamsConfig(props));
assertThat(
exception.getMessage(),
containsString("<the message to verify>")
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verification has been added

…ptionHandler

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: loicgreffier <loic.greffier@michelin.com>
Copy link
Copy Markdown
Member

@cadonna cadonna left a comment

Choose a reason for hiding this comment

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

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>
@loicgreffier loicgreffier force-pushed the KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig branch from 85060e6 to 60bba3b Compare May 29, 2024 17:24
Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>
@loicgreffier
Copy link
Copy Markdown
Contributor Author

@cadonna I've rebased this PR so file changes are now clear. Do we need to squash commits manually or is it automatically done when merging ?

sebastienviale and others added 2 commits May 29, 2024 21:49
…fig' of https://github.com/loicgreffier/kafka into KAFKA-16448-Add-Processing-Exception-Handler-StreamsConfig
Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: loicgreffier <loic.greffier@michelin.com>
@cadonna
Copy link
Copy Markdown
Member

cadonna commented May 30, 2024

@cadonna I've rebased this PR so file changes are now clear. Do we need to squash commits manually or is it automatically done when merging ?

Thanks! Squashing happens when merging. Don't worry!

@cadonna cadonna merged commit 3f70c46 into apache:trunk May 30, 2024
cadonna added a commit to cadonna/kafka that referenced this pull request May 30, 2024
cadonna added a commit that referenced this pull request May 30, 2024
…uration (#16092)" (#16141)

This reverts commit 3f70c46.

Reviewer: Lucas Brutschy <lbrutschy@confluent.io>
chiacyu pushed a commit to chiacyu/kafka that referenced this pull request Jun 1, 2024
…pache#16092)

This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing.

This PR brings ProcessingExceptionHandler in Streams configuration.

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>

Reviewer: Bruno Cadonna <cadonna@apache.org>
chiacyu pushed a commit to chiacyu/kafka that referenced this pull request Jun 1, 2024
…uration (apache#16092)" (apache#16141)

This reverts commit 3f70c46.

Reviewer: Lucas Brutschy <lbrutschy@confluent.io>
wernerdv pushed a commit to wernerdv/kafka that referenced this pull request Jun 3, 2024
…pache#16092)

This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing.

This PR brings ProcessingExceptionHandler in Streams configuration.

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>

Reviewer: Bruno Cadonna <cadonna@apache.org>
wernerdv pushed a commit to wernerdv/kafka that referenced this pull request Jun 3, 2024
…uration (apache#16092)" (apache#16141)

This reverts commit 3f70c46.

Reviewer: Lucas Brutschy <lbrutschy@confluent.io>
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Jun 8, 2024
…pache#16092)

This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing.

This PR brings ProcessingExceptionHandler in Streams configuration.

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>

Reviewer: Bruno Cadonna <cadonna@apache.org>
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Jun 8, 2024
…uration (apache#16092)" (apache#16141)

This reverts commit 3f70c46.

Reviewer: Lucas Brutschy <lbrutschy@confluent.io>
gongxuanzhang pushed a commit to gongxuanzhang/kafka that referenced this pull request Jun 12, 2024
…pache#16092)

This PR is part of KAFKA-16448 which aims to bring a ProcessingExceptionHandler to Kafka Streams in order to deal with exceptions that occur during processing.

This PR brings ProcessingExceptionHandler in Streams configuration.

Co-authored-by: Dabz <d.gasparina@gmail.com>
Co-authored-by: sebastienviale <sebastien.viale@michelin.com>

Reviewer: Bruno Cadonna <cadonna@apache.org>
gongxuanzhang pushed a commit to gongxuanzhang/kafka that referenced this pull request Jun 12, 2024
…uration (apache#16092)" (apache#16141)

This reverts commit 3f70c46.

Reviewer: Lucas Brutschy <lbrutschy@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kip Requires or implements a KIP streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants