2
http発信ゲートウェイコールを再試行条件で作成します。アウトバウンドゲートウェイは、私がERRORまたはCOMPLETEを返す残りのAPIまで再試行します。HTTPアウトバウンド再試行条件(チェッカー条件の場合)
私は何です:
<int-http:outbound-gateway request-channel="checkJobChannel"
url="http://host/rest/job-status"
http-method="GET"
extract-request-payload="true"
expected-response-type="java.lang.String"
reply-timeout="10000"
reply-channel="checkJobChannel.reply"
auto-startup="true"
transfer-cookies="true">
、ルータ
@Router(inputChannel = "checkJobChannel.reply",applySequence = "true")
public String pointJob(Message<?>reply) {
String returnChannel ="";
if(reply.getPayload().get("status").equals("RUNNING")){
returnChannel="checkJobChannel";
}else if(reply.getPayload().get("status").equals("COMPLETE")|reply.getPayload().get("status").equals("ERROR")){
returnChannel="nextChannel";
}
return returnChannel;
}
私はそのように行うことができますか?ありがとう。それを達成するための簡単な方法は何ですか?
Ok Artem、私はそれを実装しようとします。ありがとう – Harji