Skip to content

Commit

Permalink
seek() doc clarification (confluentinc#3004)
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhill authored and garrett528 committed Apr 8, 2022
1 parent 18ba97f commit c1b16c0
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/rdkafka.h
Original file line number Diff line number Diff line change
Expand Up @@ -3589,9 +3589,14 @@ int rd_kafka_consume_stop(rd_kafka_topic_t *rkt, int32_t partition);
* @brief Seek consumer for topic+partition to \p offset which is either an
* absolute or logical offset.
*
* If \p timeout_ms is not 0 the call will wait this long for the
* seek to be performed. If the timeout is reached the internal state
* will be unknown and this function returns `RD_KAFKA_RESP_ERR__TIMED_OUT`.
* If \p timeout_ms is specified (not 0) the seek call will wait this long
* for the consumer to update its fetcher state for the given partition with
* the new offset. This guarantees that no previously fetched messages for the
* old offset (or fetch position) will be passed to the application.
*
* If the timeout is reached the internal state will be unknown to the caller
* and this function returns `RD_KAFKA_RESP_ERR__TIMED_OUT`.
*
* If \p timeout_ms is 0 it will initiate the seek but return
* immediately without any error reporting (e.g., async).
*
Expand Down Expand Up @@ -3622,11 +3627,13 @@ rd_kafka_resp_err_t rd_kafka_seek(rd_kafka_topic_t *rkt,
*
* The offset may be either absolute (>= 0) or a logical offset.
*
* If \p timeout_ms is not 0 the call will wait this long for the
* seeks to be performed. If the timeout is reached the internal state
* will be unknown for the remaining partitions to seek and this function
* will return an error with the error code set to
* `RD_KAFKA_RESP_ERR__TIMED_OUT`.
* If \p timeout_ms is specified (not 0) the seek call will wait this long
* for the consumer to update its fetcher state for the given partition with
* the new offset. This guarantees that no previously fetched messages for the
* old offset (or fetch position) will be passed to the application.
*
* If the timeout is reached the internal state will be unknown to the caller
* and this function returns `RD_KAFKA_RESP_ERR__TIMED_OUT`.
*
* If \p timeout_ms is 0 it will initiate the seek but return
* immediately without any error reporting (e.g., async).
Expand Down

0 comments on commit c1b16c0

Please sign in to comment.