Skip to content

Commit 2502a8f

Browse files
neetkeeartembilan
authored andcommitted
Doc polishing, remove connectionFactory
1 parent 996f864 commit 2502a8f

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
@@ -145,7 +145,7 @@ public String getId() {
145145

146146
/**
147147
* Set the group id to override the {@code group.id} property in the
148-
* connectionFactory.
148+
* ContainerFactory.
149149
* @param groupId the group id.
150150
* @since 1.3
151151
*/

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
@@ -43,7 +43,7 @@ private ProducerFactoryUtils() {
4343

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

108108
private static <K, V> void bindResourceToTransaction(KafkaResourceHolder<K, V> resourceHolder,
109-
ProducerFactory<K, V> connectionFactory) {
110-
TransactionSynchronizationManager.bindResource(connectionFactory, resourceHolder);
109+
ProducerFactory<K, V> producerFactory) {
110+
TransactionSynchronizationManager.bindResource(producerFactory, resourceHolder);
111111
resourceHolder.setSynchronizedWithTransaction(true);
112112
if (TransactionSynchronizationManager.isSynchronizationActive()) {
113113
TransactionSynchronizationManager
114-
.registerSynchronization(new KafkaResourceSynchronization<K, V>(resourceHolder, connectionFactory));
114+
.registerSynchronization(new KafkaResourceSynchronization<K, V>(resourceHolder, producerFactory));
115115
}
116116
}
117117

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
@@ -1517,12 +1517,12 @@ To configure this feature, set the `idleEventInterval` on the container:
15171517
[source, java]
15181518
----
15191519
@Bean
1520-
public KafKaMessageListenerContainer(ConnectionFactory connectionFactory) {
1520+
public KafkaMessageListenerContainer(ConsumerFactory<String, String> consumerFactory) {
15211521
ContainerProperties containerProps = new ContainerProperties("topic1", "topic2");
15221522
...
15231523
containerProps.setIdleEventInterval(60000L);
15241524
...
1525-
KafKaMessageListenerContainer<String, String> container = new KafKaMessageListenerContainer<>(...);
1525+
KafkaMessageListenerContainer<String, String> container = new KafKaMessageListenerContainer<>(...);
15261526
return container;
15271527
}
15281528
----

0 commit comments

Comments
 (0)