Hi

If you use camel-main then there is a JIRA about making configuring
this out of the box better
https://issues.apache.org/jira/browse/CAMEL-13535

For spring-boot there is already an example you can look at.

But yeah we should get this done for camel main, so keep an eye on
that JIRA ticket

On Tue, Nov 19, 2019 at 1:53 PM Imran Raza Khan <imranrazak...@gmail.com> wrote:
>
> I have MQTT route like below
>
>     from("paho:mytopic?brokerUrl=tcp://0.0.0.0:1883&clientId=ipc)
>     .routeId("myroute")
>     .to("log:my?showAll=true&multiline=true");
>
> it starts only if broker is available and after that if it lost
> connectivity with broker it handle it very well and resume.
>
> But my concern is how i can start first time if broker is not available?
>
> I searched on google and got to know  "SupervisingRouteController" might
> help in this regard, But no document is available how i can use it.
> By some hit and trial i reach this point but what further i can do as no
> document available
>
>     final Main main = new Main();
>     main.addRouteBuilder(new MyMqttRoute());
>     SupervisingRouteController controller =
> main.getCamelContexts().get(0).getRouteController().unwrap(SupervisingRouteController.class);
>     main.run();



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to