3
Queue1에 메시지가 도착한 직후가 아니라 지정된 간격으로 Queue1에서 Queue2로 메시지를 전달해야합니다. 아래는 내 설정입니다. 폴러> 구성 :Spring JMS 통합에서 간격 기반 cron 구성
<int-jms:inbound-channel-adapter id="inboundChannelAdapterId" connection-factory="connFactory" destination="jmsQueue1" channel="queueChannel" >
<int:poller send-timeout="2000" >
<!--
<int:interval-trigger initial-delay="60000" interval="60000"
fixed-rate="true"/>
-->
<int:cron-trigger expression="0 0/1 * * * ?" />
</int:poller>
</int-jms:inbound-channel-adapter>
<int-jms:outbound-channel-adapter channel="queueChannel" connection-factory="connFactory" destination="jmsQueue2" >
</int-jms:outbound-channel-adapter>
<int:channel id="queueChannel" />
상기 XML 구성 < INT를 무시하고 queue1을 행 Queue2 즉시 메시지를 전송한다. 나는 간격 기반 및 cron 기반 솔루션을 모두 시도해 보았고 비슷한 (Queue1에서 Queue2로 즉시 메시지 전달)하는 것처럼 보입니다. 여기에 "폴러"구성에 문제가 있습니까? 어떤 도움을 많이 주시면 감사하겠습니다.
답장을 보내 주셔서 감사합니다. 나는 당신의 제안을 시도했으나 문제를 해결하지 못했습니다. 내가 다시 의사를 통해 갔을 때 @ [link] (http://static.springsource.org/spring-integration/reference/htmlsingle/),이 기능은 큐 기반 어댑터가 수신으로 지원되지 않는다는 것을 알려줍니다 차단되지 않습니다 기다려 ?? ** 한편, Spring Integration 자체의 대기열 기반 채널을 사용할 때, 타임 아웃 값에 참여할 기회가 있습니다. 다음 예는 Polling Consumer가 거의 즉각적으로 메시지를 수신하는 방법을 보여줍니다. ** 이전에 이것을 시도한 적이 있습니까? 다시 한 번 감사드립니다! – CoderTR
어떤 스프링 통합 버전을 사용하고 있습니까? 기본적으로 차단 호출을하지 않으려면 2.0.4에서 동작이 변경되었습니다. https://github.com/garyrussell/spring-integration/commit/b59bdc0d70087b015589a70ed3cb32ef44cf6dd6 –
현재 2.0.x 버전은 2.0.5입니다. 2.1.0도 사용할 수 있습니다. –