1
下面是出站http網關配置了標題,但在添加輪詢器時沒有連續觸發。它只會觸發一次並停止。帶有輪詢器的彈簧集成出站網關
<int:inbound-channel-adapter channel="fooinfotrigger.channel" expression="''">
<int:poller fixed-delay="5000"></int:poller>
</int:inbound-channel-adapter>
<int:channel id="fooinfo.channel">
<int:queue capacity="10"/>
</int:channel>
<int:channel id="fooinfotrigger.channel"></int:channel>
<int:chain input-channel="fooinfotrigger.channel" output-channel="fooinfo.channel">
<int:header-enricher>
<int:header name="Authorization" value="...." />
<int:header name="Content-Type" value="...." />
</int:header-enricher>
<int-http:outbound-gateway id="fooHttpGateway"
url="https://foo.com/v1/services/foo?status=active"
http-method="GET"
expected-response-type="java.lang.String"
charset="UTF-8"
reply-timeout="5000">
</int-http:outbound-gateway>
<int:transformer method="transform" ref="fooResourcesTransformer"/>
</int:chain>
<bean id="fooResourcesTransformer" class="com.foo.FooTransformer" />
是的同意你。當REST服務失敗並出現401 Http狀態錯誤時,它會正確重新觸發,但當它以200 Http狀態成功時,它不會重新觸發。我在這個要點複製了類似的例子,它也有相同的問題https://gist.github.com/krishnaaravacadreon/3b22ff9a33c3fada2500d76789cee817 – user1044173
M-m-m。另一方面,該測試用例在第一個結果接收後才退出。所以,這是完全的事實,你可能只有一次民意測驗。 –