Transactional binder producer factory

With a transactional binder, the producer factory should not be destroyed.

Resolves #626
This commit is contained in:
Soby Chacko
2019-04-08 14:18:43 -04:00
committed by Gary Russell
parent efd46835a1
commit 33603c62f0

View File

@@ -314,7 +314,9 @@ public class KafkaMessageChannelBinder extends
List<PartitionInfo> partitionsFor = producer
.partitionsFor(destination.getName());
producer.close();
((DisposableBean) producerFB).destroy();
if (this.transactionManager == null) {
((DisposableBean) producerFB).destroy();
}
return partitionsFor;
}, destination.getName());
this.topicsInUse.put(destination.getName(),