-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add advanced pub/sub heartbeat based last sample miss detection (#1701)
* Add advanced publisher heartbeat * Add subscriber heartbeat listener * Remove unrelated history conf condition * Fix session close deadlock * Add heartbeat test * Rename heartbeat API * Change subscriber RecoveryConf to only allow one of periodic_queries or heartbeat * Fix debug log string * Fix known issues with heartbeat subscriber * Change heartbeat test keyexpr * Update z_advanced_sub example to use heartbeat * Fix use statements
- Loading branch information
Showing
8 changed files
with
357 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,6 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use std::time::Duration; | ||
|
||
use clap::{arg, Parser}; | ||
use zenoh::config::Config; | ||
use zenoh_ext::{AdvancedSubscriberBuilderExt, HistoryConfig, RecoveryConfig}; | ||
|
@@ -32,7 +30,7 @@ async fn main() { | |
let subscriber = session | ||
.declare_subscriber(key_expr) | ||
.history(HistoryConfig::default().detect_late_publishers()) | ||
.recovery(RecoveryConfig::default().periodic_queries(Some(Duration::from_secs(1)))) | ||
.recovery(RecoveryConfig::default().heartbeat()) | ||
.subscriber_detection() | ||
.await | ||
.unwrap(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.