Skip to content

Commit 8a71c69

Browse files
StreamTask.initializeTransactions
1 parent 75d3a44 commit 8a71c69

2 files changed

+18
-2
lines changed

kafka-streams-StreamsConfig.adoc

+4
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ String EXACTLY_ONCE = "exactly_once"
200200

201201
* <<kafka-streams-internals-AbstractTask.adoc#eosEnabled, AbstractTask>> is created
202202

203+
* <<kafka-streams-internals-GlobalStateManagerImpl.adoc#, GlobalStateManagerImpl>> is created
204+
205+
* <<kafka-streams-internals-StreamThread.adoc#create, StreamThread>> is created
206+
203207
=== [[postProcessParsedConfig]] `postProcessParsedConfig` Method
204208

205209
[source, java]

kafka-streams-internals-StreamTask.adoc

+14-2
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,21 @@ NOTE: `maybeAbortTransactionAndCloseRecordCollector` is used when...FIXME
516516
void initializeTransactions()
517517
----
518518

519-
`initializeTransactions`...FIXME
519+
`initializeTransactions` simply requests the <<producer, Producer>> to `initTransactions`.
520520

521-
NOTE: `initializeTransactions` is used when...FIXME
521+
In case of `TimeoutException`, `initializeTransactions` prints out the following ERROR message to the logs:
522+
523+
```
524+
Timeout exception caught when initializing transactions for task [id]. This might happen if the broker is slow to respond, if the network connection to the broker was interrupted, or if similar circumstances arise. You can increase producer parameter `max.block.ms` to increase this timeout.
525+
```
526+
527+
In the end, `initializeTransactions` throws a `StreamsException`.
528+
529+
```
530+
[logPrefix]Failed to initialize task [id] due to timeout.
531+
```
532+
533+
NOTE: `initializeTransactions` is used when `StreamTask` is <<creating-instance, created>> and requested to <<resume, resume>> (both with <<kafka-streams-internals-AbstractTask.adoc#eosEnabled, exactly-once support enabled>>).
522534

523535
=== [[producerMetrics]] `producerMetrics` Method
524536

0 commit comments

Comments
 (0)