Skip to content

Commit fddbafe

Browse files
committed
Add getter for template producer factory
SIK-GH-260
1 parent 1241e9b commit fddbafe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ public boolean isTransactional() {
158158
return this.transactional;
159159
}
160160

161+
/**
162+
* Return the producer factory used by this template.
163+
* @return the factory.
164+
* @since 2.2.5
165+
*/
166+
public ProducerFactory<K, V> getProducerFactory() {
167+
return this.producerFactory;
168+
}
169+
161170
@Override
162171
public ListenableFuture<SendResult<K, V>> sendDefault(@Nullable V data) {
163172
return send(this.defaultTopic, data);

0 commit comments

Comments
 (0)