Aaronontheweb on dev
Added v1.4.16 placeholder for n… (compare)
cool. Is this something the user has to remember or can the persistence plugin enlist the correct serializer.
Meaning if change my serializer to wire and then I switch my persistence plugin to one requiring JSON, can I ensure I don't get wire formatted chunks sent to the persistence writer?
akka.actor {
serializers {
redis = "Akka.Serialization.YourOwnSerializer, YourOwnSerializer"
}
serialization-bindings {
"Akka.Persistence.Redis.Journal.JournalEntry, Akka.Persistence.Redis" = redis
"Akka.Persistence.Redis.Snapshot.SnapshotEntry, Akka.Persistence.Redis" = redis
}
}
I am trying to play around with EventsByTag in Akka Persistence but running into an issue. I have defined config:
// In config
event-adapters = {
security-tagger = "AkkaPersistenceTest.SecurityTagger, AkkaPersistenceTest"
}
event-adapter-bindings = {
"AkkaPersistenceTest.SecurityEntity, AkkaPersistenceTest" = security-tagger
}
public class SecurityEntity
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Identifier { get; set; }
}
public class SecurityTagger : IWriteEventAdapter
{
public SecurityTagger(ExtendedActorSystem system) // For some reason it actually wants a constructor with actor system.
{
}
public string Manifest(object evt)
{
return "";
}
public object ToJournal(object evt)
{
var e = evt as SecurityEntity;
if (e == null) return evt;
Console.WriteLine("Tagging security {0} with {1}", e.Id, e.Identifier);
return new Tagged(e, new[] { e.Identifier });
}
I see it instantiate the Tagger but never calls the ToJournal and never records the actual tags on the persistence entry. I am using Akka.Persistence.Cassandra plugin based on the PR submitted by Constantin. Am I missing some configuration? I see the actual persistence working and event recorded, just without the tags. Thanks.