Doc polishing, remove connectionFactory

(cherry picked from commit 2502a8fe1c)
This commit is contained in:
Artem Yakshin
2018-10-18 14:32:28 -04:00
committed by Artem Bilan
parent 16f3d8c99d
commit aa400fa4b8
4 changed files with 8 additions and 8 deletions

View File

@@ -133,7 +133,7 @@ public abstract class AbstractKafkaListenerEndpoint<K, V>
/**
* Set the group id to override the {@code group.id} property in the
* connectionFactory.
* ContainerFactory.
* @param groupId the group id.
* @since 1.3
*/

View File

@@ -42,7 +42,7 @@ public final class ProducerFactoryUtils {
/**
* Obtain a Producer that is synchronized with the current transaction, if any.
* @param producerFactory the ConnectionFactory to obtain a Channel for
* @param producerFactory the ProducerFactory to obtain a Channel for
* @param <K> the key type.
* @param <V> the value type.
* @return the resource holder.
@@ -105,12 +105,12 @@ public final class ProducerFactoryUtils {
}
private static <K, V> void bindResourceToTransaction(KafkaResourceHolder<K, V> resourceHolder,
ProducerFactory<K, V> connectionFactory) {
TransactionSynchronizationManager.bindResource(connectionFactory, resourceHolder);
ProducerFactory<K, V> producerFactory) {
TransactionSynchronizationManager.bindResource(producerFactory, resourceHolder);
resourceHolder.setSynchronizedWithTransaction(true);
if (TransactionSynchronizationManager.isSynchronizationActive()) {
TransactionSynchronizationManager
.registerSynchronization(new KafkaResourceSynchronization<K, V>(resourceHolder, connectionFactory));
.registerSynchronization(new KafkaResourceSynchronization<K, V>(resourceHolder, producerFactory));
}
}

View File

@@ -71,7 +71,7 @@ public class KafkaTransactionManager<K, V> extends AbstractPlatformTransactionMa
private final ProducerFactory<K, V> producerFactory;
/**
* Create a new KafkaTransactionManager, given a ConnectionFactory.
* Create a new KafkaTransactionManager, given a ProducerFactory.
* Transaction synchronization is turned off by default, as this manager might be used alongside a datastore-based
* Spring transaction manager like DataSourceTransactionManager, which has stronger needs for synchronization. Only
* one manager is allowed to drive synchronization at any point of time.

View File

@@ -1265,12 +1265,12 @@ To configure this feature, set the `idleEventInterval` on the container:
[source, java]
----
@Bean
public KafKaMessageListenerContainer(ConnectionFactory connectionFactory) {
public KafkaMessageListenerContainer(ConsumerFactory<String, String> consumerFactory) {
ContainerProperties containerProps = new ContainerProperties("topic1", "topic2");
...
containerProps.setIdleEventInterval(60000L);
...
KafKaMessageListenerContainer<String, String> container = new KafKaMessageListenerContainer<>(...);
KafkaMessageListenerContainer<String, String> container = new KafKaMessageListenerContainer<>(...);
return container;
}
----