Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-7477

Improve Streams close timeout semantics

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: streams
    • Labels:

      Description

      See https://github.com/apache/kafka/pull/5682#discussion_r221473451

      The current timeout semantics are a little "magical":

      • 0 means to block forever
      • negative numbers cause the close to complete immediately without checking the state

      I think this would make more sense:

      • reject negative numbers
      • make 0 just signal and return immediately (after checking the state once)
      • if I want to wait "forever", I can use ofYears(1) or ofMillis(Long.MAX_VALUE) or some other intuitively "long enough to be forever" value instead of a magic value.

       

      Part of https://cwiki.apache.org/confluence/display/KAFKA/KIP-358%3A+Migrate+Streams+API+to+Duration+instead+of+long+ms+times

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                NIzhikov Nikolay Izhikov
                Reporter:
                vvcephei John Roesler
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: