Hello,
I tried to use PinnedDispatcher using the following configuration (in
application.conf):
app {
pinnedDispatcher {
type = "PinnedDispatcher"
executor = "thread-pool-executor"
thread-pool-executor.allow-core-timeout = off
thread-pool-executor {
core-pool-size-min = 2
core-pool-size-factor = 2.0
core-pool-size-max = 4
}
throughput = 1
}
}
akka.actor.deployment {
/master/worker {
dispatcher = app.pinnedDispatcher
router = round-robin-pool
}
}
This is my code for creating worker pool (inside MyMaster actor called
"master"):
private lazy val worker =
context.actorOf(FromConfig.props(Props[MyWorker]), "worker")
Worker actors are receiving messages but it looks like actors created on
one thread are later executed on another thread.
Is my configuration incorrect? I thought that using pinned dispatcher would
guarantee that an actor created on a thread would later be always called
from that same thread.
I'd appreciate any help with this problem.
Thanks,
M
On Thursday, July 27, 2017 at 11:17:12 AM UTC-7, Rafał Sumisławski wrote:
>
> Hi
> A PinnedDispatcher may be what your looking for. It creates a dedicated
> thread for each actor.
>
> It's documented (with an example) here:
> http://doc.akka.io/docs/akka/current/scala/dispatchers.html#types-of-dispatchers
>
> Best Regards,
> Rafał
>
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.