You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by farmdawgnation <gi...@git.apache.org> on 2017/10/31 17:57:51 UTC

[GitHub] kafka pull request #4165: KAFKA 6086: Provide for custom error handling when...

GitHub user farmdawgnation opened a pull request:

    https://github.com/apache/kafka/pull/4165

    KAFKA 6086: Provide for custom error handling when Kafka Streams fails to produce

    This PR creates and implements the `ProductionExceptionHandler` as described in [KIP-210](https://cwiki.apache.org/confluence/display/KAFKA/KIP-210+-+Provide+for+custom+error+handling++when+Kafka+Streams+fails+to+produce).
    
    I've additionally provided some default implementations: `AlwaysFailProductionExceptionHandler` and `AlwaysContinueProductionExceptionHandler`. I fixed various compile errors in the tests that resulted from my changing of method signatures, but aside from that haven't gotten around to adding new tests for this functionality. I would be specifically interested in suggestions for the kinds of tests the committers would like to see. Barring any different suggestions, I'm probably going to add a few cases to `RecordCollectorTest`, I think, that exercise the always continue and always fail options to assert they do what they advertise?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/farmdawgnation/kafka msf/kafka-6086

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/4165.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4165
    
----
commit 679c1e4e612f382a5d993144f1dc234821fe0d43
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-21T00:37:52Z

    Implement ProductionExceptionHandler
    
    This interface will be used to specify how to behave when there is an
    exception while producing a result record to Kafka.

commit cfd357b2e9b3270393abd72813202f2a7cf950b5
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-31T17:00:00Z

    Provide an AlwaysFailProductionExceptionHandler.
    
    This is a default implementation of the production exception handler
    that will always instruct Streams to fail when there is an error
    producing.
    
    This implementation is consistent with the behavior before KIP-210 was
    implemented.

commit 563933ca99838d7408e882f4114c4911cf1e5b59
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-31T17:02:22Z

    Provide an AlwaysContinueProductionExceptionHandler
    
    This production exception handler will always continue processing in
    light of errors producing result records.

commit fbdd28507005557ae83e7809830667acd7f21b01
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-31T17:03:13Z

    Add config declaration for production exception handler

commit 7ed622f08216aa8f4c8f2c988b58a29c997a66be
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-31T17:12:16Z

    Remove unused import

commit d85172557f41b6a31599a3d8bd127ecdbd520413
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-31T17:19:46Z

    Create the ProductionExceptionHandler, provide to RecordCollectorImpl

commit a856f4624e16ed286f5ba0d53b0b2096d7ef3c67
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-31T17:26:33Z

    Consult ProductionExceptionHandler when there are issues producing
    
    When an exception is returned to the onCompletion callback, consult the
    ProductionExceptionHandler when determining whether or not to fail the
    application. If the response is FAIL, preserve the existing behavior. If
    the response is not FAIL, simply log a warning and carry on.

commit f1f1d371d344b9a3e15385dbb1ea880280291c43
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-31T17:33:17Z

    Invoke ProductionExceptionHandler for exceptions outside of onCompletion
    
    This permits the ProductionExceptionHandler to make decisions about
    whether or not to try to continue when any kind of exception results
    from invoking producer.send.

commit f3dc407bf5629b6bdaa177ef2a8d3cdd39c9cda7
Author: Matt Farmer <ma...@frmr.me>
Date:   2017-10-31T17:50:58Z

    Correct compile errors in tests originating from signature changes

----


---

[GitHub] kafka pull request #4165: KAFKA-6086: Provide for custom error handling when...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/kafka/pull/4165


---