On Monday, September 25, 2017 at 7:57:01 AM UTC+2, Patrik Nordwall wrote:
>
> Event adapter is the recommended way to add tags, to keep the logic in the 
> actor free from this event consuming aspect.


Thank you for the answer. The problem I have with tagging in an 
*EventAdapter* is that I need different tags for different actors (and even 
for different instances of the same actor) and this means that tags for 
*StateChangeEvent* can only be extracted parsing the state identifier 
string, which I believe is not ideal. For standard persistent actors we add 
tags directly when persisting the event (given an instance of an actor all 
events receive the same tags, so we have a trait with a custom "persist" 
function that adds the tags). Any suggestion on how to derive tags in other 
ways is welcome :-)

        Tomassino

P.S.: The reason why I have to tag state changes is that I'm using 
akka-persistence-cassandra with the *delayed-event-timeout* to a value 
different from 0, which basically means that all persisted events with the 
same persistence id must have the same tags, otherwise the query fails.

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to