camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale King <>
Subject Re: Multiple inputs to an endpoint
Date Mon, 26 Aug 2013 16:55:57 GMT
You are fundamentally misunderstanding the way that Camel works. Camel is
built around the concept of an Exchange which is what is passed from one
processor to another. Each link in the chain of a route implements the
Processor interface where it receives an Exchange and modifies it or
possibly produces a new Exchange.

Your mappingURI processor can only receive a single Exchange. It cannot
receive multiple exchanges in one call.

You can certainly pass multiple pieces of data within one exchange using
properties, headers, the body and attachments, but fundamentally the
argument is one exchange.

There are certainly ways to read from 2 files to create 2 different files
creating multiple exchanges and then combining them together into one
exchange that is then passed to the mappingURI processor (e.g. Aggregator,
or content enricher), but if you are not actually doing any processing of
the files in camel it may make more sense to just pass the file names as
parameters to the mappingURI URL.

Once again it is not clear what you really want to accomplish.

On Mon, Aug 26, 2013 at 11:20 AM, nanotech <> wrote:

> I have to take in two files as input because the 3rd party custom mapping
> route is expecting two arguments ( both as byte[] )
> So the example would be
>         <route>
>             <from uri="file:input/file1.xml"/>
>             <convertBodyTo type="byte[]"/>
>             <from uri="file:input/file2.xml"/>
>             <convertBodyTo type="byte[]"/>
>             <to uri="mappingURI:MyMappingTranslation"/>
>         </route>
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Dale King

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