Polish "Allow to configure Kafka Listener's onlyLogRecordMetadata"
See gh-24582
This commit is contained in:
parent
b539e2e749
commit
ec683605d4
|
|
@ -189,7 +189,7 @@ public class ConcurrentKafkaListenerContainerFactoryConfigurer {
|
|||
map.from(properties::getMonitorInterval).as(Duration::getSeconds).as(Number::intValue)
|
||||
.to(container::setMonitorInterval);
|
||||
map.from(properties::getLogContainerConfig).to(container::setLogContainerConfig);
|
||||
map.from(properties::getOnlyLogRecordMetadata).to(container::setOnlyLogRecordMetadata);
|
||||
map.from(properties::isOnlyLogRecordMetadata).to(container::setOnlyLogRecordMetadata);
|
||||
map.from(properties::isMissingTopicsFatal).to(container::setMissingTopicsFatal);
|
||||
map.from(this.transactionManager).to(container::setTransactionManager);
|
||||
map.from(this.rebalanceListener).to(container::setConsumerRebalanceListener);
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ public class KafkaProperties {
|
|||
* Whether to suppress the entire record from being written to the log when
|
||||
* retries are being attempted.
|
||||
*/
|
||||
private Boolean onlyLogRecordMetadata;
|
||||
private boolean onlyLogRecordMetadata;
|
||||
|
||||
/**
|
||||
* Whether the container should fail to start if at least one of the configured
|
||||
|
|
@ -1021,11 +1021,11 @@ public class KafkaProperties {
|
|||
this.logContainerConfig = logContainerConfig;
|
||||
}
|
||||
|
||||
public Boolean getOnlyLogRecordMetadata() {
|
||||
public boolean isOnlyLogRecordMetadata() {
|
||||
return this.onlyLogRecordMetadata;
|
||||
}
|
||||
|
||||
public void setOnlyLogRecordMetadata(Boolean onlyLogRecordMetadata) {
|
||||
public void setOnlyLogRecordMetadata(boolean onlyLogRecordMetadata) {
|
||||
this.onlyLogRecordMetadata = onlyLogRecordMetadata;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class KafkaPropertiesTests {
|
|||
void listenerDefaultValuesAreConsistent() {
|
||||
ContainerProperties container = new ContainerProperties("test");
|
||||
Listener listenerProperties = new KafkaProperties().getListener();
|
||||
assertThat(listenerProperties.isOnlyLogRecordMetadata()).isEqualTo(container.isOnlyLogRecordMetadata());
|
||||
assertThat(listenerProperties.isMissingTopicsFatal()).isEqualTo(container.isMissingTopicsFatal());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue