-
Notifications
You must be signed in to change notification settings - Fork 164
Closed
Description
Calls that pass through KafkaEx.Server will time out at 5 seconds regardless of the setting of sync_timeout because of the GenServer.call's default timeout.
At first I thought we could just grab the value of sync_timeout and modify all of the GenServer.calls to have an appropriate timeout, but this gets messy if you ever want to support different timeout values to different KafkaEx.Server instances.
I can think of three basic solutions here:
- Support a single global (still configurable) value for sync timeout. I think if you want to go this route we should remove the sync timeout value from the GenServer state b/c it isn't actually state anymore.
- Support a per-worker timeout value. This would mean allowing the value to be passed into create_worker. It would also make modifying the GenServer.calls to support higher timeout values tricky because the timeout value would have to be tailored to each process somehow.
- Add optional timeout arguments to API calls that interact with the GenServer processes. We could optionally pass these timeouts through to NetworkClient.
The third option could be combined with either of the first two. What do you think, @bjhaid?
Metadata
Metadata
Assignees
Labels
No labels