-1

camel route:

 from("file://" + REST_FILES + "?idempotent=true")
     .from("file://" + FTP_FILES + "?idempotent=true")
     .process(new Processor() {
         @Override
         public void process(Exchange exchange) {
         }

Is it possible to understand inside process method - was exchange obtained from REST_FILES or from FTP_FILES ?

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

1 Answers1

1

I would think from a maintenance and test perspective it would be better to split this into three different routes.

Route 1 receives from the first file endpoint and sends it to new route that does the processing.

Route 2 receives from the first file endpoint and sends it to new route that does the processing.

Route 3 which is the new route does the actual processing.

You can then set an Exchange property from route 1 and 2 that identifies which route the message is coming from and then in route 3 make a decision on what to do based on that property.

Souciance Eqdam Rashti
  • 3,143
  • 3
  • 15
  • 31