Skip to content

Commit

Permalink
Acknowledged messages if not bridged
Browse files Browse the repository at this point in the history
Signed-off-by: Didier Wenzek <[email protected]>
  • Loading branch information
didier-wenzek committed Sep 13, 2024
1 parent 028ea2f commit 80be771
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/extensions/tedge_mqtt_bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,10 @@ async fn half_bridge(
if let Some(topic) = transformer.convert_topic(&publish.topic) {
received += 1;
target.publish(topic.to_string(), publish).await;
} else {
// Being not forwarded to this bridge target
// The message has to be acknowledged
recv_client.ack(&publish).await.unwrap()
}
}
}
Expand Down

0 comments on commit 80be771

Please sign in to comment.