You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ddewaele <dd...@gmail.com> on 2014/10/14 17:44:34 UTC
Camel MQTT Endpoint reconnect on transport failure
We're using the MQTT endpoint end noticed that when there is a transport
failure the endpoint simply disconnects the connection but never connects
again.
Attempting to publish messages using this endpoint results in a failure :
java.lang.IllegalStateException: Disconnected
Is this by design or is there something we can do to alter this behavior ?
Shouldn't the endpoint attempt to reconnect in this case ?
public void onFailure(Throwable value) {
connection.disconnect(new Callback<Void>() {
public void onSuccess(Void value) {
}
public void onFailure(Throwable e) {
LOG.debug("Failed to disconnect from " +
configuration.getHost() + ". This exception is ignored.", e);
}
});
}
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MQTT-Endpoint-reconnect-on-transport-failure-tp5757564.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQTT Endpoint reconnect on transport failure
Posted by nvbabu <na...@gmail.com>.
Hi,
Is this issue got fixed?
i am facing similar problem with MQTT and Stomp.
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MQTT-Endpoint-reconnect-on-transport-failure-tp5757564p5780960.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQTT Endpoint reconnect on transport failure
Posted by ddewaele <dd...@gmail.com>.
Created a ticket yesterday in the camel mqtt component
https://issues.apache.org/jira/browse/CAMEL-7914
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MQTT-Endpoint-reconnect-on-transport-failure-tp5757564p5757588.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQTT Endpoint reconnect on transport failure
Posted by Charles Moulliard <ch...@gmail.com>.
Hi David,
The camel mqtt component does not implement the "ReconnectAttempts"
parameters of the mqtt-client (
https://github.com/fusesource/mqtt-client#controlling-connection-reconnects).
Can you please raise a ticket to request to improve the client please ?
Regards,
On Tue, Oct 14, 2014 at 5:44 PM, ddewaele <dd...@gmail.com> wrote:
> We're using the MQTT endpoint end noticed that when there is a transport
> failure the endpoint simply disconnects the connection but never connects
> again.
>
> Attempting to publish messages using this endpoint results in a failure :
> java.lang.IllegalStateException: Disconnected
>
> Is this by design or is there something we can do to alter this behavior ?
> Shouldn't the endpoint attempt to reconnect in this case ?
>
> public void onFailure(Throwable value) {
> connection.disconnect(new Callback<Void>() {
> public void onSuccess(Void value) {
> }
>
> public void onFailure(Throwable e) {
> LOG.debug("Failed to disconnect from " +
> configuration.getHost() + ". This exception is ignored.", e);
> }
> });
> }
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-MQTT-Endpoint-reconnect-on-transport-failure-tp5757564.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io