[improve][doc] Note that --timeout-ms also sets the negative ack redelivery delay - #1216
Merged
david-streamlio merged 2 commits intoAug 25, 2026
Merged
Conversation
…livery delay FunctionConfigUtils.convert sets sourceSpec.negativeAckRedeliveryDelayMs from functionConfig.getTimeoutMs(), so a function's --timeout-ms silently drives two settings: the unacknowledged-message timeout and the redelivery delay applied to negatively acknowledged messages. Nothing says so. The timeoutMs row documents only the message timeout, and negativeAckRedeliveryDelayMs is not a function-level option at all -- there is no FunctionConfig field and no flag in CmdFunctions, so the sink equivalent (--negative-ack-redelivery-delay-ms, documented in io-cli.md) has no counterpart here. A user tuning --timeout-ms has no way to learn that redelivery timing moves with it. The three runtimes also differ, which the row now records: Java applies both, Python applies the message timeout only (#26411), and Go applies the redelivery delay only -- its ConsumerOptions sets NackRedeliveryDelay and no ack timeout.
… docs The contribution guide asks that a documentation change applying to a supported version update versioned_docs alongside docs/. The coupling this note describes is present in every supported release: 5.0.x, 4.2.x, and 4.0.x. The runtime line differs from docs/ and is not a straight copy. #26415 gave the Go runtime the negative-ack redelivery delay on master only, and it is in none of these releases; the Go runtime has never applied an ack timeout either, its ConsumerOptions carrying neither field. So Go applies *neither* setting in the released versions, where master will soon apply one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
FunctionConfigUtils.convertsets a function's negative-ack redelivery delay from its message timeout:So
--timeout-mssilently drives two settings: the unacknowledged-message timeout and the delay before a negatively acknowledged message is redelivered.Nothing in the docs says so. The
timeoutMsrow documents only the message timeout, andnegativeAckRedeliveryDelayMsis not a function-level option at all — there is noFunctionConfigfield and no flag inCmdFunctions. The sink equivalent,--negative-ack-redelivery-delay-ms, is documented inio-cli.md, which makes the absence for functions look like an oversight rather than a deliberate coupling.The practical effect: someone lowering
--timeout-msto fail fast also shortens redelivery, and someone raising it for a slow downstream also delays every retry. Neither is discoverable from the current description.Modifications
Amend the
timeoutMsrow to state the coupling, and record how the three runtimes differ:PulsarSourcecalls bothackTimeout(...)andnegativeAckRedeliveryDelay(...).python_instance.pypassesunacked_messages_timeout_msbut never the redelivery delay, so the client default of 60 s always applies.instance.gobuildsConsumerOptionswithNackRedeliveryDelayand no ack timeout.Versioned docs
The coupling is present in every supported release, so
docs/plus 5.0.x, 4.2.x, and 4.0.x.The runtime line there is not a copy of the one in
docs/. apache/pulsar#26415 gave the Go runtime the negative-ack redelivery delay on master only, and it is in none of these releases; the Go runtime has never applied an ack timeout either, itsConsumerOptionscarrying neither field. So the versioned copies say Go applies neither setting, wheredocs/says it applies the redelivery delay.Follow-up
apache/pulsar#26413 makes the Python runtime honour the redelivery delay. When it lands, the Python entry becomes "yes" and the #26411 reference comes out — a one-line change I will send separately rather than describing behaviour that has not shipped.
I have deliberately left that PR labelled
doc-not-needed. The gap documented here predates it and is equally true of Java today, so it seemed wrong to make an unrelated fix carry it.Documentation
This is the documentation change.