Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
JastAdd
RagConnect
Commits
52785f37
Commit
52785f37
authored
Jun 29, 2020
by
René Schöne
Browse files
Use retain for initial robot config.
- see
#26
parent
72b5eccf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/MqttUpdater.jadd
View file @
52785f37
...
...
@@ -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>() {
@Override
public void onSuccess(Void value) {
logger.debug("Published some bytes to {}", topic);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment