Je reçois l'erreur `La corrélation nulle n'est pas autorisée. Peut-être que la CorrelationStrategy échoue?Spring Integration La corrélation nulle n'est pas autorisée. Peut-être que la CorrelationStrategy échoue?
Ce fil de discussion a semblé le résoudre avec quelque chose comme le suivant, mais cette approche ne fonctionne pas pour moi, http://forum.spring.io/forum/spring-projects/integration/102054-aggregator-correlation-strategy-failing. D'après ce que je comprends, l'adaptateur de canal de transmission en continu entrant place FILE_NAME en tant que valeur d'en-tête, et j'aimerais y participer.
<int-ftp:inbound-streaming-channel-adapter
auto-startup="true" id="ftpListener" channel="ftpChannel"
session-factory="ftpSessionFactory" remote-directory="/export/home/udyj"
filename-pattern="test1.txt">
<integration:poller fixed-rate="5000"
max-messages-per-poll="-1" />
</int-ftp:inbound-streaming-channel-adapter>
<int-ftp:inbound-streaming-channel-adapter
auto-startup="true" id="ftpListener2" channel="ftpChannel"
session-factory="ftpSessionFactory" remote-directory="/export/home/udyj"
filename-pattern="test2.txt">
<integration:poller fixed-rate="5000"
max-messages-per-poll="-1" />
</int-ftp:inbound-streaming-channel-adapter>
<bean id="correlationStrategy"
class="org.springframework.integration.aggregator.HeaderAttributeCorrelationStrategy">
<constructor-arg value="FILE_NAME.substring(0,3)" />
</bean>
<integration:aggregator id="nuggetAggregator"
input-channel="ftpChannel" output-channel="sendMQDistributionChannel"
correlation-strategy="correlationStrategy">
</integration:aggregator>