feat: add MQTT keepalive_interval config to allow custom value per bridge#3365
Merged
rina23q merged 1 commit intothin-edge:mainfrom Jan 29, 2025
Conversation
Codecov ReportAttention: Patch coverage is Additional details and impacted files📢 Thoughts on this report? Let us know! |
albinsuresh
reviewed
Jan 28, 2025
crates/common/tedge_config/src/tedge_config_cli/tedge_config.rs
Outdated
Show resolved
Hide resolved
Contributor
Robot Results
|
didier-wenzek
approved these changes
Jan 28, 2025
Contributor
didier-wenzek
left a comment
There was a problem hiding this comment.
Approved.
Unrelated to this PR:
- The changes for c8y, az and aws bridges are so similar that it sounds as a failure to be DRY. Actually, the main point is to configure a mosquitto bridge and one should have a
mosquitto::bridgeabstraction, not an abstraction per cloud.
albinsuresh
reviewed
Jan 29, 2025
|
|
||
| /// The amount of time after which the bridge should send a ping if no other traffic has occured | ||
| #[tedge_config(example = "60s", default(from_str = "60s"))] | ||
| keepalive_interval: SecondsOrHumanTime, |
Contributor
There was a problem hiding this comment.
Optional:
Suggested change
| keepalive_interval: SecondsOrHumanTime, | |
| keep_alive_interval: SecondsOrHumanTime, |
Contributor
There was a problem hiding this comment.
I take that back, after noticing that the term keepalive is kinda like the norm across protocols like HTTP and GRPC.
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
45bf3d9 to
2a5a2ec
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
As per the request in #3153, add
<cloud>.bridge.keepalive_intervalto the tedge config settings.Example usage:
With mosquitto, the value will be shown explicitly in
c8y-bridge.confas :Using
60sas default as I found 60 seconds is the default for both mosquitto and rumqttc.Types of changes
Paste Link to the issue
#3153
Checklist
cargo fmtas mentioned in CODING_GUIDELINEScargo clippyas mentioned in CODING_GUIDELINESFurther comments