The serializer is selected based on the class of the top message class, as you have noticed. You can implement delegation to other serializer if you are in control of the top serializer. That is done in several cases in Akka when we wrap messages, e.g. here https://github.com/akka/akka/blob/master/akka-cluster-tools/src/main/scala/akka/cluster/pubsub/protobuf/DistributedPubSubMessageSerializer.scala#L206
/Patrik On Mon, Nov 9, 2015 at 3:24 PM, <[email protected]> wrote: > Hi, > > Just wondering if there is a way to specify a serializer for a specific > class (not specific message)? > > For instance in my case i have a tree and instead of passing an actual > node of the tree i'd rather pass just the path of that node. This would > save a lot of additional serialization headache. > > I've tried creating a customer JSerializer and adding it to my > serialization-bindings but as the documentation states i don't think its > having an affect as its a field of a message and not the message itself. > > Any advice would be appreciated > > -- > >>>>>>>>>> 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. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> 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.
