Skip to content

Commit 596df20

Browse files
committed
Pull isTransactional() up to KafkaOperations
1 parent 3d451fd commit 596df20

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ public interface KafkaOperations<K, V> {
209209
*/
210210
void sendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata> offsets, String consumerGroupId);
211211

212+
/**
213+
* Return true if the implementation supports transactions (has a transaction-capable
214+
* producer factory).
215+
* @return true or false.
216+
* @since 3.2
217+
*/
218+
boolean isTransactional();
219+
212220
/**
213221
* A callback for executing arbitrary operations on the {@link Producer}.
214222
* @param <K> the key type.

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,7 @@ public void setMessageConverter(RecordMessageConverter messageConverter) {
149149
this.messageConverter = messageConverter;
150150
}
151151

152-
/**
153-
* Return true if this template supports transactions (has a transaction-capable
154-
* producer factory).
155-
* @return true or false.
156-
* @since 2.1.3
157-
*/
152+
@Override
158153
public boolean isTransactional() {
159154
return this.transactional;
160155
}

0 commit comments

Comments
 (0)