Open francisdb opened 8 years ago
This is still the issue...
This is still the issue...
This is still the issue...
This is still the issue...
any news on that?
Just to close the issue.
org.fusesource.mqtt.client.Listener
was deprecated in favor of org.fusesource.mqtt.client.ExtendedListener
.
The new usage as I could understand from the code is as follows (please, correct me if I'm wrong):
connection.listener(new ExtendedListener() {
public void onPublish(UTF8Buffer utf8Buffer, Buffer buffer, Callback<Callback<Void>> callback) {
callback.onSuccess(new Callback<Void>() {
public void onSuccess(Void aVoid) {
System.out.println(new String(buffer.toByteArray()));
}
public void onFailure(Throwable throwable) {}
});
}
public void onDisconnected() {}
public void onConnected() {}
public void onPublish(UTF8Buffer topic, Buffer payload, Runnable ack) {}
public void onFailure(Throwable value) {
value.printStackTrace();
}
});
org.fusesource.mqtt.client.Listener
is annotated with@Deprecated
but there is no reference to the new way of doing things