On Sun, Jan 11, 2015 at 1:22 PM, Tal Pressman <[email protected]> wrote:
> Hi, > > Thanks for your replies. > > @Akka Team - I have considered using a custom router, but that's where my > question comes from. The RoutingLogic just specifies where the message > should be sent, but it is unaware of when messages actually get passed > along. Even if I assume that a routed message gets sent immediately I would > still have to manage the set of waiting acknowledgements per message, which > I was hoping to avoid. > > @Patrik - Spawning separate actors to handle each message's > acknowledgements is an interesting idea I hadn't thought of - it could > potentially simplify ack management quite a bit. However, I'm not sure > solves my problem. I was looking into routers as a way to improve > performance, as they can handle several messages in parallel. > > In truth, I'm having second-thoughts about using routers here so I might > take Patrik's suggestion, but I still think the issue of integrating > routers with persistence bears some more thought (even if the conclusion is > that it's not recommended to use them together). > I don't think there is a problem with routers and persistent actors per se. If I understood your description correctly you are trying to fan out one message to more than one destination and want to confirm back when all destinations have confirmed. That is not supported by current routers, and it is easier to implement with ordinary actors than a custom router. /Patrik > Thanks, > Tal > > > > On Friday, January 2, 2015 at 5:15:23 PM UTC+2, Patrik Nordwall wrote: >> >> Hi Tal, >> >> Before diving into routers, think about how you would implement it with >> an ordinary actor? >> "collecting all the acknowledgements" sounds like spawning a child actor >> in my ears. >> >> Cheers, >> Patrik >> >> >> >> On Thu, Jan 1, 2015 at 9:20 AM, Akka Team <[email protected]> wrote: >> >>> Hi Tal, >>> >>> Have you tried using a custom router: http://doc.akka.io/docs/akka/ >>> 2.3.8/scala/routing.html#Custom_Router ? >>> >>> -Endre >>> >>> On Tue, Dec 23, 2014 at 1:00 PM, Tal Pressman <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I have a system that receives messages and has to route them (based on >>>> some "complicated" logic) to a number of destinations reliably (with >>>> at-least-once semantics). It seems that the most natural way to achieve the >>>> routing part is to create a Router with custom RoutingLogic. The >>>> reliability part is easy to achieve using (akka-persistence 's) >>>> AtLeastOnceDelivery. However, I don't see how to integrate the two >>>> approaches together, and would love to hear if anyone has any ideas. >>>> >>>> So a little more details on what I'm looking for. I need an actor that, >>>> when it receives a message: >>>> >>>> - Applies some logic to the message to determine its destinations. >>>> - Sends the message to those destinations and await >>>> acknowledgements, retrying failed deliveries. >>>> - After collecting all the acknowledgements, acknowledge the >>>> original message. >>>> >>>> Obviously, I can create an AtLeastOnceDelivery actor and implement the >>>> routing and ack management myself, but I was wondering if there was a >>>> cleaner approach here. >>>> >>>> Thanks, >>>> Tal >>>> >>>> -- >>>> >>>>>>>>>> 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. >>> >> >> >> >> -- >> >> Patrik Nordwall >> Typesafe <http://typesafe.com/> - Reactive apps on the JVM >> Twitter: @patriknw >> >> -- > >>>>>>>>>> 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. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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.
