Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Camel MQTT Endpoint reconnect on transport failure

$
0
0
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);

});

Viewing all articles
Browse latest Browse all 5648

Trending Articles