On 21/02/18 15:52, Konrad “ktoso” Malawski wrote:

You’re attempting to send a function.

remote ! Identify  <<< Identify here is wrong

Note that it is a case class, that takes a parameter:

final case class Identify(messageId: Any)

remote ! Identify(“hello”)

should work just fine.

Ahah, my assessment of my stupidity was spot on, thanks ;-)

I had also tried:

    remote ! Identify(remote)

but that didn't work either, following your hint:

    remote ! Identity(remote.toSerializationFormat)

also works. Is there a list anywhere of what Akka/Scala types have default protobuf serializers?

On a related note, I enabled "akka.actor.serialize-creators" but that triggered:

[WARN] [SECURITY][02/21/2018 18:01:29.021] [main] [DisabledJavaSerializer(akka://RITA)] Outgoing message attempted to use Java Serialization even though `akka.actor.allow-java-serialization = off` was set! Message type was: [class java.lang.Class]

which isn't exactly helpful in identifying the error. I suspect it's cause by the companion object Props creator pattern that's recommended in the docs, e.g.

    object Controller {
      def props = Props(new Controller)
    }

If I use the

    system.actorOf(Props(classOf[MyActor], arg1, arg2))

alternative I get a slightly different error:

[WARN] [SECURITY][02/21/2018 18:16:18.205] [main] 
[DisabledJavaSerializer(akka://RITA)] Outgoing message attempted to use Java 
Serialization even though `akka.actor.allow-java-serialization = off` was set! 
Message type was: [class akka.actor.ActorSelection$$anon$1]

Doesn't this mean that "akka.actor.serialize-creators" is pretty much useless in practice?

--
Alan Burlison
--

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