Skip to content

Commit aa400fa

Browse files
neetkeeartembilan
authored andcommitted
Doc polishing, remove connectionFactory
(cherry picked from commit 2502a8f)
1 parent 16f3d8c commit aa400fa

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

spring-kafka/src/main/java/org/springframework/kafka/config/AbstractKafkaListenerEndpoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public String getId() {
133133

134134
/**
135135
* Set the group id to override the {@code group.id} property in the
136-
* connectionFactory.
136+
* ContainerFactory.
137137
* @param groupId the group id.
138138
* @since 1.3
139139
*/

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private ProducerFactoryUtils() {
4242

4343
/**
4444
* Obtain a Producer that is synchronized with the current transaction, if any.
45-
* @param producerFactory the ConnectionFactory to obtain a Channel for
45+
* @param producerFactory the ProducerFactory to obtain a Channel for
4646
* @param <K> the key type.
4747
* @param <V> the value type.
4848
* @return the resource holder.
@@ -105,12 +105,12 @@ public static void clearConsumerGroupId() {
105105
}
106106

107107
private static <K, V> void bindResourceToTransaction(KafkaResourceHolder<K, V> resourceHolder,
108-
ProducerFactory<K, V> connectionFactory) {
109-
TransactionSynchronizationManager.bindResource(connectionFactory, resourceHolder);
108+
ProducerFactory<K, V> producerFactory) {
109+
TransactionSynchronizationManager.bindResource(producerFactory, resourceHolder);
110110
resourceHolder.setSynchronizedWithTransaction(true);
111111
if (TransactionSynchronizationManager.isSynchronizationActive()) {
112112
TransactionSynchronizationManager
113-
.registerSynchronization(new KafkaResourceSynchronization<K, V>(resourceHolder, connectionFactory));
113+
.registerSynchronization(new KafkaResourceSynchronization<K, V>(resourceHolder, producerFactory));
114114
}
115115
}
116116

spring-kafka/src/main/java/org/springframework/kafka/transaction/KafkaTransactionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class KafkaTransactionManager<K, V> extends AbstractPlatformTransactionMa
7171
private final ProducerFactory<K, V> producerFactory;
7272

7373
/**
74-
* Create a new KafkaTransactionManager, given a ConnectionFactory.
74+
* Create a new KafkaTransactionManager, given a ProducerFactory.
7575
* Transaction synchronization is turned off by default, as this manager might be used alongside a datastore-based
7676
* Spring transaction manager like DataSourceTransactionManager, which has stronger needs for synchronization. Only
7777
* one manager is allowed to drive synchronization at any point of time.

src/reference/asciidoc/kafka.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,12 +1265,12 @@ To configure this feature, set the `idleEventInterval` on the container:
12651265
[source, java]
12661266
----
12671267
@Bean
1268-
public KafKaMessageListenerContainer(ConnectionFactory connectionFactory) {
1268+
public KafkaMessageListenerContainer(ConsumerFactory<String, String> consumerFactory) {
12691269
ContainerProperties containerProps = new ContainerProperties("topic1", "topic2");
12701270
...
12711271
containerProps.setIdleEventInterval(60000L);
12721272
...
1273-
KafKaMessageListenerContainer<String, String> container = new KafKaMessageListenerContainer<>(...);
1273+
KafkaMessageListenerContainer<String, String> container = new KafKaMessageListenerContainer<>(...);
12741274
return container;
12751275
}
12761276
----

0 commit comments

Comments
 (0)