Abhinav Sundaram
Abhinav Sundaram

Reputation: 3

Is it possible to call a Camel Route xml from Java method?

I am trying to call a camel route xml from the Java method. Is it possible to call and return to the same method again?

Upvotes: 0

Views: 2937

Answers (1)

burki
burki

Reputation: 7025

Yes, you can use a ProducerTemplate for that.

If your caller has to wait for the route to complete, your route must be executed synchronously (for example direct routes). See exchange pattern for more details.

If you expect a response from the route you should use one of the request* methods of the producer template (not the send* methods).

Upvotes: 1

Related Questions