camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pmp.martins" <>
Subject Is there a way to send a message when I am terminating?
Date Fri, 08 Nov 2013 11:20:06 GMT
Hello all, I have a simply camel MINA server using the JAVA DSL, and I am
running like the example documented here:

Currently this server receives reports from a queue, updates them, and then
sends them away to the next server. A very simple code:

public class MyApp_B {

	private Main main;

	public static void main(String... args) throws Exception {
		MyApp_B loadbalancer = new MyApp_B();

	public void boot() throws Exception {
		main = new Main();

				new RouteBuilder(){
					public void configure() throws Exception {
						.setHeader("minaServer", constant("localhost:9991"))
						.beanRef("service.Reporting", "updateReport")


		System.out.println("Starting Camel MyApp_B. Use ctrl + c to terminate the

Now, I would like to know if it is possible to do two things:
1 - Make this server send a message to a master server when it starts
running. This is an "Hello" message with this server's information
2 - Tell the master server to forget him when I shut it down pressing CTRL+C
or doing something else.

Is there a way to do this ? If yes how? If not, what are my options?

Thanks in advance, Pedro.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message