fs2-kafka icon indicating copy to clipboard operation
fs2-kafka copied to clipboard

Thread naming strategy

Open TimWSpence opened this issue 4 years ago • 2 comments

Is there a reason why we append the thread id to the thread name here?

We saw fs2-kafka-consumer-78 and were worried that we'd messed up our threadpools and that the kafka actor wasn't running on a pool of size 1

TimWSpence avatar Sep 22 '21 08:09 TimWSpence

I guess to ensure the name is unique when there are multiple consumers? @vlovgr would know. But I think we could replace that with a global AtomicLong counter - a mildly unpleasant thing to do but I don't foresee it causing any problems.

bplommer avatar Sep 22 '21 08:09 bplommer

It is just to ensure uniqueness, yes. Feel free to raise a pull request with AtomicLong-based numbering.

vlovgr avatar Sep 22 '21 09:09 vlovgr