>
>
>
>
>
>
>If you reply to this email, your message will be added to the discussion below:
>
>
> http://camel.465427.n5.nabble.com/Creating-routes-dynamically-like-a-for-tp5740703p5
ically.
Now I only have to figure out a way to stop those routes and threads..
--
View this message in context:
http://camel.465427.n5.nabble.com/Creating-routes-dynamically-like-a-for-tp5740703p5741217.html
Sent from the Camel - Users mailing list archive at Nabble.com.
RoutesToCamelContext(camelContext);
}catch(Exception e){
e.printStackTrace();
}
}
---
Hope this works for you, or my apologies if I mis-guided you because I am
also a co-learner :-)
--
View this message in context:
http://camel.465427.n5.nabble.com/Creat
from the database and I would
> also like to check for any new accounts in the database every now and then
> so I can create another route receiving to that account.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Creating-routes-dynamically-lik
n the database every now and then
so I can create another route receiving to that account.
--
View this message in context:
http://camel.465427.n5.nabble.com/Creating-routes-dynamically-like-a-for-tp5740703p5740764.html
Sent from the Camel - Users mailing list archive at Nabble.com.
ry database ->
> returns 3 accounts
> create 3 routes ->
>from( account 1 )
>from( account 2 )
>from( account 3 )
> go again from start
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Creating-routes-dynamically-like-a-for-tp5740703p5740746.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
runtime:
query database ->
returns 3 accounts
create 3 routes ->
from( account 1 )
from( account 2 )
from( account 3 )
go again from start
--
View this message in context:
http://camel.465427.n5.nabble.com/Creating-routes-dynamically-like-a-for-tp5740703p5740746.html
Sen
)
Or am I wrong here?
Jan
> -Ursprüngliche Nachricht-
> Von: kraythe . [mailto:kray...@gmail.com]
> Gesendet: Mittwoch, 2. Oktober 2013 07:42
> An: Camel Users List
> Betreff: Re: Creating routes dynamically like a for()
>
> Just put the for outside. I do this a
prüngliche Nachricht-
> > Von: mamouros [mailto:csst0...@yahoo.gr]
> > Gesendet: Dienstag, 1. Oktober 2013 17:58
> > An: users@camel.apache.org
> > Betreff: Creating routes dynamically like a for()
> >
> > I would like to create a route for every query my sql route re
sor )
Jan
> -Ursprüngliche Nachricht-
> Von: mamouros [mailto:csst0...@yahoo.gr]
> Gesendet: Dienstag, 1. Oktober 2013 17:58
> An: users@camel.apache.org
> Betreff: Creating routes dynamically like a for()
>
> I would like to create a route for every query my sql route retur
uot;);
>
> }
>
> so if I have 3 entries in my table, I would create 3 routes.
>
> How is that possible. Is there any EIP that does that?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Creating-routes-dynamically-like-a-for-tp5740703.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
:" + fromUri + "?dataSource=dataSource") ) {
.to("bean:SmsReceiver?method=creatingRoutes");
}
so if I have 3 entries in my table, I would create 3 routes.
How is that possible. Is there any EIP that does that?
--
View this message in context:
http://camel.465427.n5.n
Fri, Jul 6, 2012 at 11:06 AM, Sri wrote:
> Hi ,
>
> I have used in following way which works creating routes dynamically.
>
>
> ProducerTemplate template=exchange.getContext().createProducerTemplate();
>
> Message msg=exchange.getOut();
> S
> How ever I wanted to read the messages from these routes
> and But no clue how to inform this routes the which is going to be consumed?
I don't get this sentence, could you elaborate it a little bit?
--
Henryk Konsek
http://henryk-konsek.blogspot.com
Hi ,
I have used in following way which works creating routes dynamically.
ProducerTemplate template=exchange.getContext().createProducerTemplate();
Message msg=exchange.getOut();
System.err.println("Out msg headers " + msg.getHeaders());
for(int
> You could use a Dynamic Router:
Yeah, I suggest to evaluate Dynamic Router and Recipient List for your
case. In many cases when somebody wants to create routes dynamically
at runtime, she actually needs these two patterns :) .
--
Henryk Konsek
http://henryk-konsek.blogspot.com
over the period of time. And is it feasble
> to have this kind of architecture?.
>
>
>
> Regards
> Sri
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/creating-routes-dynamically-tp5715557.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Yeah, reconsider your design.
and instead of
CamelContext context = new DefaultCamelContext();
the preferred way is
CamelContext context = exchange.getContext();
if you use a processor to build your routes dynamically.
Best,
Christian
On Thu, Jul 5, 2012 at 6:31 PM, Henryk Konsek wrote:
> H
Hi Sri,
> I wanted to create routes dynamically based on the msg header I receive and
> send msg to that route .
Yes, you can.
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start1
.nabble.com/creating-routes-dynamically-tp5715557.html
Sent from the Camel - Users mailing list archive at Nabble.com.
;>> .to("file:C:\\FtpTestFolders\\FtpError");
>>> //Here I may or may not want to add other headers,
>>> endpoints and processors
>>>
>>> }
>>>
r may not want to add other headers,
>> endpoints and processors
>>
>> }
>> });
>>
>> This is fine but what if I have defined my headers and endpoint in
>> somewhere
>> else (db/file/etc) and I wan&
te it.
Thank you
--
View this message in context:
http://camel.465427.n5.nabble.com/Creating-routes-dynamically-tp4948062p4948062.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Also being able to add processors to each target endpoint would be
necessary...
--
View this message in context:
http://camel.465427.n5.nabble.com/Creating-routes-dynamically-tp4948062p4948350.html
Sent from the Camel - Users mailing list archive at Nabble.com.
reate routes based on these dynamically.
The API is quite complex so if someone could post me an example I would
really appreciate it.
Thank you
--
View this message in context:
http://camel.465427.n5.nabble.com/Creating-routes-dynamically-tp4948062p4948062.html
Sent from the Camel - Users mailing list archive at Nabble.com.
25 matches
Mail list logo