diff --git a/dz3r-mqtt/src/main/java/net/sf/dz3r/device/mqtt/v1/AbstractMqttAdapter.java b/dz3r-mqtt/src/main/java/net/sf/dz3r/device/mqtt/v1/AbstractMqttAdapter.java index bc76b6ba9..26d63b227 100644 --- a/dz3r-mqtt/src/main/java/net/sf/dz3r/device/mqtt/v1/AbstractMqttAdapter.java +++ b/dz3r-mqtt/src/main/java/net/sf/dz3r/device/mqtt/v1/AbstractMqttAdapter.java @@ -212,7 +212,12 @@ private Flux createFlux(String topic, boolean includeSubtopics) { }); }); - var result = flux.publish().autoConnect(); + var result = flux + .doOnNext(s -> logger.trace("{}: receive: {}", getAddress(), s)) + .doOnError(t -> logger.error("{}: errored out", getAddress(), t)) + .doOnComplete(() -> logger.debug("{}: completed", getAddress())) + .publish() + .autoConnect(); var topicFilter = topic + (includeSubtopics ? "/#" : "");