I don't think that is the right way to define the dispatcher for router
pool. See docs
http://doc.akka.io/docs/akka/current/scala/routing.html#configuring-dispatchers

/Patrik


tis 1 aug. 2017 kl. 20:40 skrev Viktor Klang <[email protected]>:

> «Note that it’s not guaranteed that the *same* thread is used over time,
> since the core pool timeout is used for PinnedDispatcher to keep resource
> usage down in case of idle actors. To use the same thread all the time you
> need to add thread-pool-executor.allow-core-timeout=off to the
> configuration of the PinnedDispatcher.»
>
>
> http://doc.akka.io/docs/akka/current/scala/dispatchers.html#types-of-dispatchers
>
>
>
> On Tue, Aug 1, 2017 at 5:04 PM, mc <[email protected]> wrote:
>
>> Hello,
>>
>> I'm trying 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
>>
>> --
>> >>>>>>>>>> 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.
>>
>
>
>
> --
> Cheers,
> √
>
> --
> >>>>>>>>>> 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.
>

-- 
>>>>>>>>>>      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.

Reply via email to