2017-10-16 3 views
0

を呼び出すためのチャネルにメッセージを送信していません:リモートディレクトリのファイルを削除するためのoutbound-gateway。のInt:リモートディレクトリにファイルを移動するためのアウトバウンド・チャネル・アダプタと-FTPをint型:-FTPをintにインバウンド・チャネル・アダプターを:スプリッタは、私がint-ファイルからメッセージを送信しようとしています彼らに

int-file:inbound-channel-adapterは、int-ftp:outbound-channel-adapterにメッセージをポーリングして送信し、2回目にポーリングするとint-ftp:outbound-gatewayにメッセージを送信します。 INT使用することにより

:私はまだ、単一のファイルと一つのチャンネルのみのための単一のメッセージを受信することができる午前スプリッタが起動してきています。私は両方のチャンネルにすべてのポーリングメッセージを送信したい。

例は次のとおりです。今のように働いて

  1. 初めての世論調査では、FTPをintへのメッセージ送信:アウトバウンド・チャネル・アダプタ
  2. セカンドタイムポーリングをintにメッセージを送ります-ftp:アウトバウンド・ゲートウェイ
  3. 3回目のポーリングは、FTPをintにメッセージを送信します。アウトバウンド・チャネル・アダプタ
  4. 四時間ポーリング-FTPをintへのメッセージ送信:アウトバウンド・ゲートウェイ

として達成したい:

1.First時間ポーリング-FTPをintにメッセージを送信します。アウトバウンド・チャネル・アダプタそして、INT-のftp:アウトバウンド・チャネル・アダプターをし、INT-FTPを:アウトバウンド・ゲートウェイ 2.Second時間ポーリングは、FTPをintにメッセージを送信アウトバウンド・ゲートウェイに

感謝を事前に

<int-file:inbound-channel-adapter id="inErrorINPRm" 
           channel="errorRm" 
           directory="in/error" 
           > 
    <int:poller fixed-rate="5000" /> 
</int-file:inbound-channel-adapter> 

<int:channel id="errorRm"></int:channel> 
<int:channel id="ErrorRmMv"></int:channel> 
<int:channel id="ftpINPfromError"></int:channel> 

<int:splitter id="splitter" input-channel="errorRm" output-channel="ErrorRmMv"/> 

<int-ftp:outbound-channel-adapter id="ftpError" 
           channel="ErrorRmMv" 
           session-factory="ClientFactory" 
           auto-create-directory="true" 
           remote-directory="in/error" 
           > 
</int-ftp:outbound-channel-adapter> 

<int:header-enricher id="header-enricher-error" input-channel="ErrorRmMv" output-channel="ftpINPfromError"> 
    <int:header name="file_remoteDirectory" value="in/working"/> 

</int:header-enricher> 

<int-ftp:outbound-gateway id="gatewayRmfromError" 
          session-factory="ClientFactory" 
          expression="file_remoteDirectory" 
          request-channel="ftpINPfromError" 
          command="rm" 
          > 
</int-ftp:outbound-gateway> 

答えて

0

スプリッタは分割されません。ペイロードはすでにFileです。

スプリッタは、たとえばリストを各リスト要素のメッセージに分割するためのものです。

あなたは、アダプタの入力チャンネルを作成する必要があり、ヘッダenricher <int:publish-subscribe-channel/> - あなたはそれがそれらが呼び出される順序をクリアにするために、enricherにアダプタとorder="2"order="1"を追加することができます。

+0

@Gary Russell – ram

関連する問題