-
Notifications
You must be signed in to change notification settings - Fork 37
Add ZMQ connection retry configuration #152
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
Conversation
Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>
6ddab40 to
e5f6f98
Compare
|
@zhengkezhou1 Thanks for the PR! |
Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>
|
@zhengkezhou1 Please also add a test that actually checks the retries: Also, please validate that the number of retries is not negative (it can be set to a negative value in a config file - actually, I am not sure about that, maybe the fact that the field is uint is sufficient for yaml unmarshal to fail for negative values?). |
Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>
The ZMQ Connect operation is asynchronous, which means it immediately returns success without waiting to establish a physical connection. |
| { | ||
| name: "invalid ZMQ retries time", | ||
| args: []string{"cmd", "zmq-retries-times", "-1", "--config", "../../manifests/config.yaml"}, | ||
| }, |
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 added a scenario here for when retries is a negative number.
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.
Great, please also check what happens when it is set to a negative number in config file
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 add a new file invalid-config.yaml to address this. also test default value(0) in config.yaml
| { | ||
| name: "invalid ZMQ retries time", | ||
| args: []string{"cmd", "zmq-retries-times", "-1", "--config", "../../manifests/config.yaml"}, | ||
| }, |
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.
Great, please also check what happens when it is set to a negative number in config file
Signed-off-by: zhengkezhou1 <madzhou1@gmail.com>
irar2
left a comment
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.
Thanks!
fix: #141
introduces a configurable number of retries for ZMQ connections. Previously, connection failures would terminate the process, but this new setting allows for more resilient network communication.