Skip to content

Commit 11c3acd

Browse files
committed
Remove usage of isOnlyLogRecordMetadata
The `ConsumerProperties.isOnlyLogRecordMetadata` has been removed in Spring for Apache Kafka in favor of `KafkaUtils.setConsumerRecordFormatter()`
1 parent f3d3694 commit 11c3acd

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

spring-integration-kafka/src/main/java/org/springframework/integration/kafka/inbound/KafkaMessageSource.java

-5
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,6 @@ public static class KafkaAckCallback<K, V> implements AcknowledgmentCallback, Ac
691691

692692
private final boolean isSyncCommits;
693693

694-
private final boolean logOnlyMetadata;
695-
696694
private volatile boolean acknowledged;
697695

698696
private boolean autoAckEnabled = true;
@@ -716,7 +714,6 @@ public KafkaAckCallback(KafkaAckInfo<K, V> ackInfo, @Nullable ConsumerProperties
716714
consumerProperties != null
717715
? consumerProperties.getCommitLogLevel()
718716
: LogIfLevelEnabled.Level.DEBUG);
719-
this.logOnlyMetadata = consumerProperties != null && consumerProperties.isOnlyLogRecordMetadata();
720717
}
721718

722719
@Override
@@ -761,7 +758,6 @@ private void rollback(ConsumerRecord<K, V> record) {
761758
})
762759
.collect(Collectors.toList());
763760
if (rewound.size() > 0) {
764-
KafkaUtils.setLogOnlyMetadata(this.logOnlyMetadata);
765761
this.logger.warn(() -> "Rolled back " + KafkaUtils.format(record)
766762
+ " later in-flight offsets "
767763
+ rewound + " will also be re-fetched");
@@ -771,7 +767,6 @@ private void rollback(ConsumerRecord<K, V> record) {
771767
}
772768

773769
private void commitIfPossible(ConsumerRecord<K, V> record) { // NOSONAR
774-
KafkaUtils.setLogOnlyMetadata(this.logOnlyMetadata);
775770
if (this.ackInfo.isRolledBack()) {
776771
this.logger.warn(() -> "Cannot commit offset for "
777772
+ KafkaUtils.format(record)

0 commit comments

Comments
 (0)