Hi I suggest to use camel-paho as Eclipse Paho is more active maintained than the older FuseSource MQTT client library that camel-mqtt uses.
And you say you are using Camel 2.2.0, as that is a very old version, then I assume you are using Camel 2.22.0 which is a new release. Although Camel 2.23.0 is the latest version, so you can try upgrade to that version also. On Sat, Dec 1, 2018 at 11:39 AM Daniel Perales Martín <twop...@hotmail.com> wrote: > > Hi all, > > First post in the email list, just let me know if I do something wrong :-) > > I'm having trouble with MQTT and Apache Camel. I have configured a couple of > routes to dispatch messages from JMS to MQTT and viceversa. The JMS client > works as excepted and whenever there is a failure in the initial connect or > any further reconnect it is managed gracefully, so that the route keeps > working. The problem comes with MQTT client, which causes a RuntimeException > raised up to the top layer, so that the application stops. > > I believe this shouldn't be the correct behaviour and the exception should be > handled within the route so that it keeps working. This can be easily > reproducer running a route with the MQTT broker down, it throws the exception > to the Main class after the 10 seconds timeout elapses. I have checked the > same code with the Paho client instead of plain MQTT client and it works > fine, similar to JMS client I'm not sure if it is something realted to the > internal implementation of the MQTT client or the wrapper of Apache Camel. > > I am using Java 8, Apache Camel 2.2.0 and Spring xml configuration. > > Anybody could give me some help / advice on this topic please? > > Please find more discussion details in this Stackoverflow topic: > > https://stackoverflow.com/questions/53546604/error-in-mqtt-apache-camel-route-causes-application-to-stop > > Thanks in advance! > > Best regards, > > Dani -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2