Akka.NET - Is it possible to mix AtLeastOnceDeliveryReceiveActor with Publish/Subscribe pattern?

239 views Asked by At

I'd like to ask whether it's possible to implement publish/subscribe pattern (http://getakka.net/articles/clustering/distributed-publish-subscribe.html) where subscriber is an AtLeastOnceDeliveryReceiveActor (http://getakka.net/articles/persistence/at-least-once-delivery.html)

I cannot make it working due to fact that AtLeastOnceDeliveryReceiveActor doesn't have Receive method, but just Command. When I get reference to an actor and using Tell method send a message then Command receive it, but if I'd like to use mediator with Publish method then Command doesn't receive that message.

Thanks in advance.

1

There are 1 answers

0
Bartosz Sypytkowski On

ReceivePersistentActor's Command works just like Receive handler (the only distinction is acknowledgement of persistence/recovery lifecycle of an actor). That being said, you could potentially build an at-least-once-delivery publish/subscribe bus... however I'd advise to simply integrate your actors logic with an existing persistent queue/log (like Kafka, RabbitMQ, Azure Service Bus, whatever) instead of trying to recreate it in Akka. I guess it will be less painful for most of the people.