Creating many “clients” vs wrapping a “client” in an actor

I just stumbled over the very same annoyance of the ClientBootrap not being sendable - including the same thought process about using an actor being overkill.

For now I just spin up new (ephemeral) bootstrap on connect and store the resulting channel, which in my case is no issue at all because the intended usage is a long-lasting connection. I also believe that creating a bootstrap is not exactly a "heavy" operation, so it's probably rarely worth adding a ton of threadsafety complexity around it.

I'm not quite sure I understand what you mean by "separate, dedicated clients" in this context, because im my mind this has nothing to do with bootstraps but rather channels.

1 Like