Hi,

We currently have a system using camel 2.8.3 in production and i am hesitant
to upgrade us to 2.9 simply so I can have GPG encryption for one route.  My
situation is as follows:

1) I generate a fixed width file from a repository bean using flat-pack
2) I want to encrypt the file that's generated in step 1
3) I want to SFTP the file to a third party vendor (I have this working)

Here is my route:
[code]
from("quartz://retirement/retirement-sync-timer?cron={{retirement.cron}}")
                .routeId("retirement-timed-sync")
                .noAutoStartup()
                .to(memberRepositoryEndPoint);

FlatpackDataFormat df = new FlatpackDataFormat();
        df.setDefinition(new
ClassPathResource("META-INF/smooks/fuintegration/retirement-fixed-width-mapping.xml"));
        df.setFixed(true);
        df.setIgnoreFirstRecord(false);

        from(memberRepositoryEndPoint)
                .to("log:org.fuwt?level=INFO")
                .routeId("retirement_file_generation")
                .marshal(df)
                .convertBodyTo(String.class)
                .log("log:org.fuwt?level=ERROR&showAll=false")
                .to(localFileEndPoint);

FUGPGUtils.encrypt(inFilePath <-- file generated by flat pack, pubKeyPath,
outFilePath);

from(encryptedFileEndPoint)
                .to("log:org.fuwt?level=INFO")
                .routeId("miliman_sftp_exchange")
                .to(sftpFileEndPoint);
[/code]

The Unit test for this route fails because the FUGPGUtils class says the
flatpack generated file doesn't exist.  n FUGPGUtils I use bouncy castle's
opengpg library for encryption and unit test for that class proves it is
working fine.  

When I remove the encryption call from the route and I just have camel SFTP
the flat pack generated file, the route works perfectly.  It's just that
when I add the encryption call, which is using something totally outside
camel (albeit in the same thread), the route breaks down.

So I need to know:

1) Should I split up the route into 3 routes: i.e. one route for flatpack
file generation, one route for encryption, and one route for sftp'ing?
2) Or should I try to fix the route as is?

Any help is appreciated

thanks

Sam

--
View this message in context: 
http://camel.465427.n5.nabble.com/GPG-encryption-in-camel-2-8-3-tp5448999p5448999.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to