Yes, DistributedPubSub sends one message on the wire per machine, and then
distributes it further locally, to all interested local actors. See the
documentation:

"For efficiency the message is sent over the wire only once per node (that
has a matching topic), and then delivered to all subscribers of the local
topic representation."

(http://doc.akka.io/docs/akka/2.4.7/scala/distributed-pub-sub.html#Publish)

Be aware though that PubSub messaging has at-most-once guarantees so you
have to prepare for message loss.

-Endre

On Wed, Jun 8, 2016 at 10:36 PM, Rob Crawford <rob5...@gmail.com> wrote:

> As I recall, the distributed pub/sub sends a single message to each node,
> then the message is distributed to the subscribers on those nodes. So it's
> likely more efficient to use this method to ask the actors for their state.
> More efficient both ways -- no million-iteration loop to generate the
> messages, and no transmission of millions of messages.
>
>
> --
> >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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