Hi all,

I'm trying to use a custom serializer for an Event using akka-persistence, 
but the serializer is never getting called. My configuration is as follows

akka {
  actor {
    serializers {
      myser = "serializers.PostCreatedSerializer"
    }

    serialization-bindings {
      "domain.protocol.PostCreated" = myser
    }
  }
}


WIth the serializer as follows:

class PostCreatedSerializer extends Serializer {

  def identifier: Int = 523010842

  def includeManifest: Boolean = false

  def fromBinary(bytes: Array[Byte], manifest: Option[Class[_]]): AnyRef = {
    PostCreated(title = "reloaded")
  }

  def toBinary(obj: AnyRef): Array[Byte] = {
    "test".asBytes
  }
}


I know it's not doing the write thing right now, but I just want to check 
whether it is getting called -> title should change to "reloaded". 
Unfortunately, it isn't.

Been spending over 6 hours trying out different configurations, but nothing 
seems to work.

Any ideas?
thanks,

pjan

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

Reply via email to