Skip to content

Commit d020704

Browse files
committed
API Compatibility Back Ports
Allow Hoxton.SR9 to work with Boot 2.2 (with s-k upgraded to 2.4.x).
1 parent c558d2b commit d020704

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ public boolean isProducerPerConsumerPartition() {
291291
* @return the configs.
292292
* @since 1.3
293293
*/
294+
@Override
294295
public Map<String, Object> getConfigurationProperties() {
295296
return Collections.unmodifiableMap(this.configs);
296297
}

spring-kafka/src/main/java/org/springframework/kafka/core/ProducerFactory.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.kafka.core;
1818

19+
import java.util.Map;
20+
1921
import org.apache.kafka.clients.producer.Producer;
2022

2123
/**
@@ -98,4 +100,14 @@ default void reset() {
98100
// NOSONAR
99101
}
100102

103+
/**
104+
* Return an unmodifiable reference to the configuration map for this factory.
105+
* Useful for cloning to make a similar factory.
106+
* @return the configs.
107+
* @since 2.4.11
108+
*/
109+
default Map<String, Object> getConfigurationProperties() {
110+
throw new UnsupportedOperationException("This implementation doesn't support this method");
111+
}
112+
101113
}

spring-kafka/src/main/java/org/springframework/kafka/listener/ContainerProperties.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,15 @@ public void setAssignmentCommitOption(AssignmentCommitOption assignmentCommitOpt
663663
this.assignmentCommitOption = assignmentCommitOption;
664664
}
665665

666+
/**
667+
* False - back ported to make Hoxton.SR9 compatible with Boot 2.2.
668+
* @return false.
669+
* @since 2.4.11
670+
*/
671+
public boolean isDeliveryAttemptHeader() {
672+
return false;
673+
}
674+
666675
@Override
667676
public String toString() {
668677
return "ContainerProperties ["

0 commit comments

Comments
 (0)