gstackoverflow
gstackoverflow

Reputation: 36976

Camel: how to route data from process method to another pipeline?

I have code like this:

.from("file://" + FTP_FILES + "?idempotent=true")
              .process(new Processor() {
                    @Override
                    public void process(Exchange exchange) throws Exception {
                      list = parseDataFromExchange(ecxhange);     
              }

I want to send this data to another pipeline vm:myEndpoint

I believe that Camel can this but google didn't help me.

How can I achieve this ?

Upvotes: 0

Views: 1623

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55540

Just use a ProducerTemplate from inside your Processor, then you can send any message to any Camel endpoint. You can find more information on the Camel website such as: http://camel.apache.org/producertemplate.html

Upvotes: 1

Related Questions