You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jtodd <jo...@gmail.com> on 2010/04/29 21:07:05 UTC
Send message on startup
I'd like to send a message to an Active MQ topic when the Camel context
starts up. What the best way to accomplish this?
--
View this message in context: http://old.nabble.com/Send-message-on-startup-tp28404593p28404593.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Send message on startup
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
You may consider to user the event component[1], if you are using Spring
to start the camel context.
Otherwise, you may need to add a hook to send the message out when stat
the camel context.
[1] http://camel.apache.org/event.html
Willem
jtodd wrote:
> I'd like to send a message to an Active MQ topic when the Camel context
> starts up. What the best way to accomplish this?
Re: Send message on startup
Posted by DanD <DD...@UP.COM>.
You can also use a quartz scheduler component in camel. It will run once
when the component is configured.
<route>
<from uri="quartz://startup"/>
<!-- create your message here -->
<to uri="jms:queue:your-queue"/>
</route>
jtodd wrote:
>
> I'd like to send a message to an Active MQ topic when the Camel context
> starts up. What the best way to accomplish this?
>
--
View this message in context: http://old.nabble.com/Send-message-on-startup-tp28404593p28586079.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Send message on startup
Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Apr 29, 2010 at 9:07 PM, jtodd <jo...@gmail.com> wrote:
>
> I'd like to send a message to an Active MQ topic when the Camel context
> starts up. What the best way to accomplish this?
> --
You can also use the EventNotifier to have callbacks when Camel is started etc.
You configure this on the CamelContext.
http://camel.apache.org/advanced-configuration-of-camelcontext-using-spring.html
> View this message in context: http://old.nabble.com/Send-message-on-startup-tp28404593p28404593.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus