Hi,

I don't think current camel supports two froms within a single route.
But you can use the direct endpoint to reuse the route like this

from("restlet:blah.com/people/{id}").to("direct://myRoute");
from("restlet:blah.com/people/{id}.json").to("direct://myRoute");

from("direct://myRoute")...

Since the direct endpoint just copy the message exchange , it will not slow down your application.

Willem


tfredrich wrote:
When using the Restlet component to expose tidy URIs, what would you
recommend regarding exposing routes as multiple endpoints?  For instance, a
single endpoint returns JSON (e.g. /people/toddf returns a JSON object
describing person ID 'toddf').  Now suppose I want to expose the same
endpoint with an explicit format URI (e.g. /people/toddf.json) that returns
the same data.

Is it better to have two routes exposed or two 'from()s' in the same route?

In other words, which is better:

*Two froms within a single route:
from("restlet:blah.com/people/{id}").from("restlet:blah.com/people/{id}.json")...

or

* Two separate routes:

from("restlet:blah.com/people/{id}")...

from("restlet:blah.com/people/{id}.json")...


Does it make a difference from a scalability, performance, and/or heap
consumption standpoint?  Thanks in advance for your advice.

--Todd

Reply via email to