Commit 52785f37 authored by René Schöne's avatar René Schöne
Browse files

Use retain for initial robot config.

- see #26
parent 72b5eccf
......@@ -231,8 +231,16 @@ public class MqttUpdater {
public void publish(String topic, byte[] bytes) {
publish(topic, bytes, false);
public void publish(String topic, byte[] bytes, boolean retain) {
publish(topic, bytes, this.qos, retain);
public void publish(String topic, byte[] bytes, org.fusesource.mqtt.client.QoS qos, boolean retain) {
connection.getDispatchQueue().execute(() -> {
connection.publish(topic, bytes, qos, false, new org.fusesource.mqtt.client.Callback<Void>() {
connection.publish(topic, bytes, qos, retain, new org.fusesource.mqtt.client.Callback<Void>() {
public void onSuccess(Void value) {
logger.debug("Published some bytes to {}", topic);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment