@@ -74,22 +74,24 @@ public final class TransactionLogConfig {
74
74
// Configuration for testing only as default value should be sufficient for typical usage
75
75
.defineInternal (PRODUCER_ID_EXPIRATION_CHECK_INTERVAL_MS_CONFIG , INT , PRODUCER_ID_EXPIRATION_CHECK_INTERVAL_MS_DEFAULT , atLeast (1 ), LOW , PRODUCER_ID_EXPIRATION_CHECK_INTERVAL_MS_DOC );
76
76
77
- private final AbstractConfig config ;
78
77
private final int transactionTopicMinISR ;
79
78
private final int transactionLoadBufferSize ;
80
79
private final short transactionTopicReplicationFactor ;
81
80
private final int transactionTopicPartitions ;
82
81
private final int transactionTopicSegmentBytes ;
83
82
private final int producerIdExpirationCheckIntervalMs ;
83
+ private final boolean transactionPartitionVerificationEnable ;
84
+ private final int producerIdExpirationMs ;
84
85
85
86
public TransactionLogConfig (AbstractConfig config ) {
86
- this .config = config ;
87
87
this .transactionTopicMinISR = config .getInt (TRANSACTIONS_TOPIC_MIN_ISR_CONFIG );
88
88
this .transactionLoadBufferSize = config .getInt (TRANSACTIONS_LOAD_BUFFER_SIZE_CONFIG );
89
89
this .transactionTopicReplicationFactor = config .getShort (TRANSACTIONS_TOPIC_REPLICATION_FACTOR_CONFIG );
90
90
this .transactionTopicPartitions = config .getInt (TRANSACTIONS_TOPIC_PARTITIONS_CONFIG );
91
91
this .transactionTopicSegmentBytes = config .getInt (TRANSACTIONS_TOPIC_SEGMENT_BYTES_CONFIG );
92
92
this .producerIdExpirationCheckIntervalMs = config .getInt (PRODUCER_ID_EXPIRATION_CHECK_INTERVAL_MS_CONFIG );
93
+ this .transactionPartitionVerificationEnable = config .getBoolean (TRANSACTION_PARTITION_VERIFICATION_ENABLE_CONFIG );
94
+ this .producerIdExpirationMs = config .getInt (PRODUCER_ID_EXPIRATION_MS_CONFIG );
93
95
}
94
96
95
97
public int transactionTopicMinISR () {
@@ -118,11 +120,11 @@ public int producerIdExpirationCheckIntervalMs() {
118
120
119
121
// This is a broker dynamic config used for DynamicProducerStateManagerConfig
120
122
public boolean transactionPartitionVerificationEnable () {
121
- return config . getBoolean ( TRANSACTION_PARTITION_VERIFICATION_ENABLE_CONFIG ) ;
123
+ return transactionPartitionVerificationEnable ;
122
124
}
123
125
124
126
// This is a broker dynamic config used for DynamicProducerStateManagerConfig
125
127
public int producerIdExpirationMs () {
126
- return config . getInt ( PRODUCER_ID_EXPIRATION_MS_CONFIG ) ;
128
+ return producerIdExpirationMs ;
127
129
}
128
130
}
0 commit comments