PubSub - Scribe with filter

29 views
Skip to first unread message

Gajendra Naidu

unread,
Jun 22, 2017, 2:44:30 AM6/22/17
to Akka User List
Just wondering if there is a way in AKKA - DistributedPubSub to subscribe messages with some filter like take the function as a parameter. The function should be like f(x) => boolean and send the message if the function returns true.

mediator ? DistributedPubSubMediator.Subscribe(subscription, ( x => true), self) 

This way message queuing to the subscriber can be avoided.

Gajendra

Patrik Nordwall

unread,
Jun 22, 2017, 12:57:40 PM6/22/17
to Akka User List
That is not supported. You have to filter in the destination (or put another actor in-between).
/Patrik
--
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Gajendra Naidu

unread,
Jun 26, 2017, 10:20:10 AM6/26/17
to Akka User List
Patrik

Was there any technical reason why it is not supported? if no, I can contribute to add this functionality.

Gajendra

Patrik Nordwall

unread,
Jun 26, 2017, 10:55:33 AM6/26/17
to akka...@googlegroups.com
To make a difference it should be filtered on the sending side and that would complicate the model quite a lot as far as I can see. Currently there is only a notion of a topic represented by one ActorRef per node, independent of how many local subscribers there are.

/Patrik

To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.

To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Reply all
Reply to author
Forward
0 new messages