-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Ping/ponging opt-in feature at the controller level #5
Comments
The actual error is: |
I am afraid ZMQ architecture / protocol design prevents us from doing that. The whole idea of ZMQ sockets is to be automatically re-connectable, i.e. services are allowed to be offline. The only way to test connectivity is to send a message to the other service. Probably we will need some sort of ping/pong workflow internally in the library for that... |
Correct
Not sure a ping/pong is needed. Just a on-demand way to send message to another service that doesn't log errors. |
something like this, its copy/paste/modify from send_to function impl<A> Endpoint<A>
where
A: ServiceAddress,
{
pub(self) fn dest_up(&mut self, source: A, dest: A) -> bool {
// what to put as data, and how to handle receiving it?
let data = vec![];
let router = match self.router {
None => {
trace!("Sending {} from {} to {} directly", request, source, dest,);
dest.clone()
}
Some(ref router) if &source == router => {
trace!("Routing {} from {} to {}", request, source, dest,);
dest.clone()
}
Some(ref router) => {
trace!("Sending {} from {} to {} via router {}", request, source, dest, router,);
router.clone()
}
};
let src = source.clone();
let dst = dest.clone();
match self.session.send_routed_message(&source.into(), &router.into(), &dest.into(), &data)
{
Ok(()) => true,
_ => false,
}
}
} |
Sorry, I am not getting. Is the logging a problem? If yes, it can be controlled in a standard way with |
I find the requested feature questionable. The intend was to distinguish between normal error logging, and add the ability to probe for services online by some sort of microservice manager, for example, without logging (this was a concern from another contributor). I will describe the actual problem.
the fn above |
If you will send just an message like in the I think we can leave the issue opened, just change its name |
Please go ahead, you know exactly how to integrate it in the larger framework :) |
We hit this logged error when testing whether a service is online, discussion here, in case it is not. It would be good to have a function for that that doesn't log, so that the broker can test whether other services are up and running.
The text was updated successfully, but these errors were encountered: