Skip to content

Commit 9d3e326

Browse files
garyrussellartembilan
authored andcommitted
Expose KafkaTemplate.transactional accessor
1 parent 114f409 commit 9d3e326

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,16 @@ public void setMessageConverter(RecordMessageConverter messageConverter) {
145145
this.messageConverter = messageConverter;
146146
}
147147

148+
/**
149+
* Return true if this template supports transactions (has a transaction-capable
150+
* producer factory).
151+
* @return true or false.
152+
* @since 2.1.3
153+
*/
154+
public boolean isTransactional() {
155+
return this.transactional;
156+
}
157+
148158
@Override
149159
public ListenableFuture<SendResult<K, V>> sendDefault(V data) {
150160
return send(this.defaultTopic, data);

0 commit comments

Comments
 (0)