camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mills, Gary (GE Digital)" <gary.L.mi...@ge.com>
Subject camel ftp producer autocreate 2.15
Date Fri, 27 May 2016 20:23:43 GMT
Hello fellow Camel's

-          Thanks in advance !!!

-
I have a question. My problem is I need to take files from message queue transform them, rename
them, and populate an ftp server with the directory structure and files, that will be transferred
to another server file share mounted on a cloud server.

The problem is creating the directory structure and renaming the files being produced on the
ftp site. I'm using camel 2.15.


                  <aggregate strategyRef="csvOutputMapAggregationStrategy" completionTimeout="45000"
>  <!-- 30000 -->
                  <correlationExpression>
                      <header>correlationId</header>
                  </correlationExpression>
                  <completionPredicate>
                      <simple>${body.totalParameterCount} == ${in.header.parameterCountByAsset[${in.header.enginePosition}]}</simple>
                  </completionPredicate>
                      <log message="Marshalling FADEC data to CSV for aircraft ${header.aircraftMetadata.shipNumber}
fleet ${header.aircraftMetadata.fleetName} asset GUID ${header.engineGuid}" loggingLevel="INFO"/>
                      <process ref="csvMarshallerProcessor"/>
                      <to uri="{{outputArchiveUri}}?fileName=${header.engineGuid}_${header.messageDateTime}.txt&amp;charset={{outputEncoding}}"/>
                      <to uri="{{cifsUri}}fileName=/${header.aircraftMetadata.outputPath}/${header.engineGuid}_${header.messageDateTime}.txt&amp;charset={{outputEncoding}}"/>
                      <log message="FILE NAME: /${header.aircraftMetadata.outputPath}/${header.engineGuid}_${header.messageDateTime}.txt"
loggingLevel="INFO" />

                      <!-- <to uri="{{DeltaPreProdFTP}}fileName=${header.aircraftMetadata.outputPath}/${header.engineGuid}_${header.messageDateTime}.txt&amp;charset={{outputEncoding}}"
/> -->
                      <to uri="ftp://smartsignal@ftp.corporate.ge.com/$simple{header.aircraftMetadata.outputPath}/$simple{header.engineGuid}_$simple{header.messageDateTime}.txt?password=RAW(NTM1MjBhMm)&amp;move=.processed&amp;readLock=changed&amp;disconnect=true&amp;stepwise=false&amp;useList=false"
/>

                      <log message="FADEC processing complete for aircraft ${header.aircraftMetadata.shipNumber}
fleet ${header.aircraftMetadata.fleetName} asset GUID ${header.engineGuid}" loggingLevel="INFO"/>
                  </aggregate>
            </split>

The cifsUri works as we want creating the directory and renaming the file : 717-200/BB9D2AC8-3B10-479B-9823-9F0AB1197C49_2016-05-27_17.03.00.txt
 ( this is because, and I think, I am ftp'ing to a mounted file share )

The DeltaPreProd or simply the uri below it, produces something like: ${header.aircraftMetadata.outputPath}/${header.engineGuid}_${header.messageDateTime}.txt/null-destination--ID-414d5120544f51313150524420202020f934e856a1819526


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message