Hi,

I have some problem during developing pub-sub application by using 
akka-stream-experimental (0.4).

I simplified my application as ping-pong 
like 
https://github.com/ijsong/rx-pubsub/tree/develop/src/main/scala/km/rxpubsub/test.

When I run PingActor (= Producer) and PongActor (= Consumer) separately, it 
throws Exception like this:

java.io.NotSerializableException: akka.stream.actor.ActorSubscriber
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183) 
~[na:1.7.0_51]
at java.io.ObjectOutputStream.defaultWriteFields(
ObjectOutputStream.java:1547) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508) 
~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeOrdinaryObject(
ObjectOutputStream.java:1431) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) 
~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) 
~[na:1.7.0_51]
at akka.serialization.JavaSerializer$$anonfun$toBinary$1.apply$mcV$sp(
Serializer.scala:129) ~[akka-actor_2.10-2.3.4.jar:na]
at akka.serialization.JavaSerializer$$anonfun$toBinary$1.apply(
Serializer.scala:129) ~[akka-actor_2.10-2.3.4.jar:na]
at akka.serialization.JavaSerializer$$anonfun$toBinary$1.apply(
Serializer.scala:129) ~[akka-actor_2.10-2.3.4.jar:na]
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57) ~[na:na]
at akka.serialization.JavaSerializer.toBinary(Serializer.scala:129) 
~[akka-actor_2.10-2.3.4.jar:na]
at akka.remote.MessageSerializer$.serialize(MessageSerializer.scala:36) 
~[akka-remote_2.10-2.3.4.jar:na]
at akka.remote.EndpointWriter$$anonfun$serializeMessage$1.apply(
Endpoint.scala:845) ~[akka-remote_2.10-2.3.4.jar:na]
at akka.remote.EndpointWriter$$anonfun$serializeMessage$1.apply(
Endpoint.scala:845) ~[akka-remote_2.10-2.3.4.jar:na]
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57) ~[na:na]
at akka.remote.EndpointWriter.serializeMessage(Endpoint.scala:844) 
~[akka-remote_2.10-2.3.4.jar:na]
at akka.remote.EndpointWriter.writeSend(Endpoint.scala:747) 
~[akka-remote_2.10-2.3.4.jar:na]
at akka.remote.EndpointWriter$$anonfun$2.applyOrElse(Endpoint.scala:722) 
~[akka-remote_2.10-2.3.4.jar:na]
at akka.actor.Actor$class.aroundReceive(Actor.scala:465) 
~[akka-actor_2.10-2.3.4.jar:na]
at akka.remote.EndpointActor.aroundReceive(Endpoint.scala:415) 
~[akka-remote_2.10-2.3.4.jar:na]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) 
[akka-actor_2.10-2.3.4.jar:na]
at akka.actor.ActorCell.invoke(ActorCell.scala:487) 
[akka-actor_2.10-2.3.4.jar:na]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) 
[akka-actor_2.10-2.3.4.jar:na]
at akka.dispatch.Mailbox.run(Mailbox.scala:220) 
[akka-actor_2.10-2.3.4.jar:na]
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(
AbstractDispatcher.scala:393) [akka-actor_2.10-2.3.4.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) 
[na:na]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(
ForkJoinPool.java:1339) [na:na]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) 
[na:na]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(
ForkJoinWorkerThread.java:107) [na:na]


If I ran PingActor (= Producer) and PongActor (= Consumer) within the same 
actor system, it is OK.


You can reproduce this situation easily by using either throwException() or 
noException() in PingPong.scala 
(https://github.com/ijsong/rx-pubsub/blob/develop/src/main/scala/km/rxpubsub/test/PingPong.scala)

Is there any problem in my code ?

Thanks.


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