Table of Contents |
---|
Status
Current state: Discuss Accepted
Discussion thread: here
JIRA: KAFKA-2120
...
Code Block | ||
---|---|---|
| ||
public static final String REQUEST_TIMEOUT_MS_CONFIG = "network.request.timeout.ms";
private static final String REQUEST_TIMEOUT_MS_DOC = "The configuration controls the maximum amount of time the producer will wait " +
"for the response of a request. If the response is not received before the timeout " +
"elapses the producer will resend the request if necessary or fail the request if " +
"retries are exhausted." |
...
- In 0.8.2.2 or 0.8.3, we will :
- Keep all the deprecated configuration there.
- If user sets TIMEOUT_CONFIG, we override REQUEST_TIMEOUT_CONFIG and show a deprecation warning and advertise the new configuration.
- If user set METADATA_FETCH_TIMEOUT_CONFIG, we override MAXoverride MAX_ENQUEUEBLOCK_TIMEOUTMS_CONFIG with METADATA_FETCH_TIMEOUT_CONFIG and warn about the deprecation.
- if user set BLOCK_ON_BUFFER_FULL_CONFIG to true, we override the MAX_ENQUEUEBLOCK_TIMEOUTMS_CONFIG with Long.MAX_VALUE and warn about the deprecation.
- if the user sets BLOCK_ON_BUFFER_FULL_CONFIG to true and also METADATA_FETCH_TIMEOUT_CONFIG, we will not honor METADATA_FETCH_TIMEOUT_CONFIG.
We will warn the users regarding the same. Also, we will be warning them to use the MAX_BLOCK_MS_CONFIG explicitly.
- In 0.9, we will remove TIMEOUT_CONFIG, METADATA_FETCH_TIMEOUT_CONFIG and BLOCK_ON_BUFFER_FULL_CONFIG.
Rejected Alternatives
Option 1
- max.buffer.full.block.ms - To replace block.on.buffer.full. The max time to block when buffer is full.
- metadata.fetch.timeout.ms - reuse metadata timeout as batch.timeout.ms because it is essentially metadata not available.
- network.request.timeout.ms - This timeout is used when producer sends request to brokers through TCP connections. It specifies how long the producer should wait for the response.
...
- Need to educate user about metadata and buffer.
- The request timeout is less explicit but will be affected by retries, linger.ms, retry backoff time, request timeout, etc.
Option 2
- max.enqueue.block.ms - the maximum time producer.send() will block, including:
- metadata fetch time
- buffer full block time
- serialization time (customized serializer)
- partitioning time (customized partitioner)
- request.timeout.ms - the maximum time to wait for the response of a message after message has been appended to the accumulator. Including:
- linger.ms
- actual network RTT
- server replication time
- retries
...