-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add MQTT keepalive_interval config to allow custom value per bridge #3365
feat: add MQTT keepalive_interval config to allow custom value per bridge #3365
Conversation
Codecov ReportAttention: Patch coverage is Additional details and impacted files📢 Thoughts on this report? Let us know! |
crates/common/tedge_config/src/tedge_config_cli/tedge_config.rs
Outdated
Show resolved
Hide resolved
Robot Results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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::bridge
abstraction, not an abstraction per cloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
/// 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional:
keepalive_interval: SecondsOrHumanTime, | |
keep_alive_interval: SecondsOrHumanTime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Proposed changes
As per the request in #3153, add
<cloud>.bridge.keepalive_interval
to the tedge config settings.Example usage:
With mosquitto, the value will be shown explicitly in
c8y-bridge.conf
as :Using
60s
as 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 fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments