The bug was not in the implicit function. I removed the implicit because it
could be easily avoided in this case.
The issue was here: (tt <- topicThreadIds; qs <- queuesAndStreams) yield (tt
If there were topic-threadIds t1, t2, and queues q1, q2, you would get (t1
-> q1) (t1, q2) (t2 -> q1) (t2 -> q2) and they were sequentially added to
the topicThreadIdAndQueues pool. So all the threads would feed into the same
Re: the computation is different because topicThreadIds in wildcard
consumption may share the same queue so you can't zip them directly. e.g.,
whether there are two or 100 allowed topics, they will all share the same
num-streams queues, and num-streams != the number of threads, so you can't
zip them. In the static topic count case, there is one-to-one correspondence
so you can zip them.
That said, I think the code can be made clearer here. I will upload another
patch in a minute.