Hi,

I really appreciate help on how to implement the following requirement:
- Delete all events in a journal belonging to a tenant (=legal requirement 
by our Customer)

Current configuration:
- Akka Persistence + Cassandra Plugin
- tag1 is set with DDD aggregate root type using a WriteEventAdapter 
(dynamic tagging)
- events have a field in the payload that identifies the tenant

I was thinking to implement this new requirement by setting tag2 with the 
tenantId. And when a tenant must be deleted delete all events where tag2 is 
set with the TentantId.
But setting tag2 with a dynamic tag is not possible because Tags that are 
attached to an event must be a Set[String] (see 1) and defined up front in 
a configuration file (see 2).

(1) case class Tagged(payload: Any, tags: Set[String]) { .. }
(2) Sample configuration of cassandra plugin
  # When using more than one tag per event you have to configure know
  # tags in this section to give each tag an identifier. When using
  # only one tag per event the identifier is 1, automatically.
  # tagname = tagid
  # where tagid must be 1, 2, or 3. Max 3 tags per event is supported.
  # For example:
  #   BlogPosts = 1
  #   Announcement = 2
  #   Authors = 1
  # With those tag identifiers you can use BlogPosts and Announcement for a 
single event,
  # but you cannot combine BlogPosts and Authors, since they have the same 
tag identifier.
  tags {
  }

For my requirement of having two dynamic tags just passing a Vector/List 
instead of defining Tags in a configuration file seems to be a better fit.
case class Tagged(payload: Any, tags: Vector[Option[String]])
val tags: Vector[Option[String]] = Vector(Some("ddd_aggr_root"), 
Some("tenant_id"))

Are there any plans to support dynamic tagging for more than one tag ?

Regards,
Her

-- 
>>>>>>>>>>      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