-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Missing timeout in SendSync #514
Comments
@webfrank I will take a look at the issue and get back to you. Also can you point me to the hard-coded 20 seconds path? |
The reply timeout is set when creating the actor system. It is a timeout that is applied to any ask-pattern message in the system. It can be set https://github.com/Tochemey/goakt/blob/v2.7.1/actors/option.go#L68. The default value is |
@webfrank kindly take a look at the example in the cluster code to see how the ask-pattern works: https://github.com/Tochemey/goakt-examples/blob/main/actor-cluster/static/actors/actors.go. I will be glad to provide further explanation. |
Hi, I think it could be useful to set it on a per message basis, having more control on it. |
Hi, I've already implemented the examples. What I was trying to achieve is to return back an error instead of waiting timeout. If a receiving actor wants to reply with an error the only thing could do is calling ctx.Err() but this does not cancel the context and does not returns the error. This way the caller should wait for the timeout. |
@webfrank fair point. I can look into that. |
@webfrank are you free for a quick call? |
Hi, sorry, dinner time. I'm CET timezone. I'll send a DM with my contacts. |
|
@webfrank kindly use the latest release |
Bug description
PID.SendSync has a fixed timeout of 20 seconds.
How to reproduce it?
Send a message to a mailbox which will not reply.
Expected behavior
This should be a configurable parameter, with a 20 secs default value.
Screenshots
Library Version:
Additional context
I would like to know how to send a ctx.Response() which is an error. Now I'm using this code:
but the receiver will timeout if ctx.Err(err) is used, I expect to have an error instead to signal an issue.
The text was updated successfully, but these errors were encountered: