Skip to content

Creating Factory Actor with Asyncronsous WorkerBuilder #125

Closed Answered by slawlor
jgould22 asked this question in Q&A
Discussion options

You must be logged in to vote

I think I understand what you're going for, but it's kind of against the notion of a factory. You need something, which is async initialized, available to each worker. The problem is that the WorkerBuilder is invoked from the factory's context, so if that operation were to fail to properly initialize a worker, the whole factory would crash, rather than a single worker (which could be restarted).

Think timeouts, spurious network issues, etc. All that shouldn't take down the whole factory. Instead each worker should be able to

  1. Startup whatever async client it needs itself from some constant data propogated by the workerbuilder [or]
  2. If there's like a global, single "client" then you can ini…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jgould22
Comment options

@slawlor
Comment options

Answer selected by jgould22
@jgould22
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants