DistributedSupplier<ConnectionFactory> factorySupplierLocal = factorySupplier; DistributedSupplier<Connection> connectionSupplier = () -> connectionFnLocal.apply(factorySupplierLocal.get()); return new SinkImpl<>(sinkName(), WriteJmsP.supplier(connectionSupplier, sessionFn, messageFn, sendFn, flushFn, destinationName, isTopic));