Hi Nikolay,

Have you tried instead to encode your mailbox requirement on the actors
themselves?


http://doc.akka.io/docs/akka/2.3.3/scala/mailboxes.html#Requiring_a_Message_Queue_Type_for_an_Actor

I find that approach much easier, and I think it is the preferred way when
using special semantics mailboxes (for example bounded ones).

-Endre


On Tue, Jun 17, 2014 at 1:14 PM, Nicholas Ustinov <[email protected]>
wrote:

> Hello!
>
> I have the next actor:
> class MessagePreprocessor extends Actor with Stash with ActorLogging
>
> And I spawn it as
> system.actorOf(FromConfig.props(MessagePreprocessor.props()),
> "messagePreProcessor")
>
> I have next config:
>
> akka.actor.deployment {
>       /messagePreProcessor {
>
>         mailbox = bounded-mailbox
>
>         router = round-robin-pool
>         resizer {
>           lower-bound = 2
>           upper-bound = 4
>           messages-per-resize = 100
>         }
>       }
>     }
>
> bounded-mailbox {
>   mailbox-type = "akka.dispatch.BoundedDequeBasedMailbox"
>   mailbox-capacity = 10
>   mailbox-push-timeout-time = 10s
> }
>
> But actually actors are created with default unbounded mailbox.
>
> But if I create it as
> system.actorOf(FromConfig.props(MessagePreprocessor.props()).withMailbox("bounded-mailbox"),
> "messagePreProcessor")
> it's created with specified bounded mailbox.
>
> What am I doing wrong when configure it only with application.conf?
>
>
> And the second question: could I determine inside actor is it routed actor
> or not? In fact I just want to know it's (or router's) name, and if it's
> not routed that's just self.path.name, and if it's under router that's
> context.parent.path.name.
>
> Thank you,
> Nikolay
>
>  --
> >>>>>>>>>> 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 http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - The software stack for applications that scale
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to