camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Camel routing to address specific users with ActiveMQ/stomp over websockets.
Date Thu, 01 Mar 2012 14:11:25 GMT
On Wed, Feb 29, 2012 at 7:32 PM, Otho <> wrote:
> Hey all,
> I have the following use-case:
> Users connect to activemq via stomp over websockets and register with a
> UUID (works).
> Users subscribe to different general topics and get notification by that
> (works).
> Now I need the following extensions:
> Users create -at runtime- custom topics with restricted usergroups.
> Users have a private queue -created at runtime with the UUID they
> registered with- where they get sent server push notifications which are
> only meant for them.
> My idea is to create routes at runtime for these extensions. How would I go
> about this? Since the UUIDs and the names  of the custom created topics
> (think channels on IRC) are not known in advance I can't put them in xml
> files or something similar.

You can add / remove / edit routes at runtime. There is API on
CamelContext to add/remove the routes etc.

For Java based routes you can create a skeleton route as a
RouteBuilder, and then just instantiate a new instance of that class,
and then configure it using getter/setters etc for the uris and
whatnot. And then in the configure method of the RouteBuilder you can
create  the route using the DSL.

With XML you can fully create a new route and add it. There is a look
example here

> So my question is: Is that in any way possible with camel/activemq tandem
> or do I have to do it directly with activemq in this case? If possible any
> pointer would be helpful.
> Regards,
> Otho

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message