camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Origin-agnostic routing
Date Tue, 27 Nov 2007 19:31:36 GMT
On 27/11/2007, Justin Stewart <> wrote:
> Hi, all.  I'm new to Camel, and I'm using it with ServiceMix to manage our
> routing capabilities.
> Our camel service can potentially receive messages from several other
> services on the bus -
> but the Camel routing examples I see always start with from(...).
> What if I don't care where it's from - I just want to route based on message
> content?
> I'm looking also at future extensibility.  I want to add new services in the
> future that will be able to send messages to this component without adding
> new from(...) cases to the service.
> Any thoughts?

So the from("...") just indicates some endpoint URI that folks can
send to. You can have multiple from clauses on a route if you want.

In a JBI context; the from("...") essentially acts as the registration
of an NMR endpoint - so that it defines a well known URI that any
component can send to.

So rather than having to change your route to include all possible
places you want to grab messages - you could get the senders of the
messages to just send to the same URI of your route. i.e. new services
would just send to this single URI if you want.

e.g. with a JMS hat on, a route could be based on a
from("activemq:MyQueue") then anyone anywhere can send to the MyQueue
to trigger the route.

Does that help at all?


Open Source Integration

View raw message