I completely missed that, thanks!
I would still rather have a way to persist arbitrary events without actors, 
but disabling the recovery also works.

Thanks,
Tal


On Thursday, June 23, 2016 at 3:21:31 PM UTC+3, Mark Hatton wrote:
>
> I apply the very same pattern in a couple of services.  The persisting 
> actor serves only to produce data for views and is itself stateless.
>
> To disable recover on the persisting actor, we add the following:
>
>   override val recovery = Recovery.none
>
>   override val receiveRecover = Actor.emptyBehavior
>
> This is documented in the Recovery section of the docs: 
> http://doc.akka.io/docs/akka/current/scala/persistence.html
>
> HTH,
>
> Mark
>
> On Wednesday, 22 June 2016 08:59:36 UTC+1, Tal Pressman wrote:
>>
>> Hi,
>>
>> We're writing a system that has 2 components: 1 that generates a 
>> (persistent) stream of events, and another that subscribes to the stream 
>> and processes the events. We want to use akka-persistence but there are 
>> some things we're not quite sure about.
>>
>> The current design uses a persistence-query on the subscriber side to 
>> process the events, and have PersistentActors on the producer side persist 
>> events. However, since the produces is stateless, we don't need the 
>> recovery (and in fact we don't want it, because it could be very 
>> time-consuming).
>> We've considered a few solutions to this:
>>
>>    - Generate empty snapshots periodically so recovery can be quick. 
>>    This works, but is a little ugly, and we'd prefer a cleaner solution.
>>    - Write the events directly to Cassandra. This would mean no recovery 
>>    for actors (and possibly no actors at all), but we'd have to modify the 
>>    code any time the persistence plugin changes the format it uses to save 
>>    events.
>>    - Use some Akka API to persist the events, without having any actors 
>>    involved. This seems like a good idea, but we couldn't find any such 
>> API... 
>>    (Maybe something with Persistence.journalFor? Seems like that's intended 
>>    more for internal use)
>>
>> I would love to hear if there is such an API that could help us, or if 
>> you think we're "doing something wrong".
>>
>> 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 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