Hi,
Here are 2 processors communicating via a channel:
class A extends Processor {
val b = context.actorFor("/user/top/b")
val channel =
context.actorOf(Channel.props(ChannelSettings(redeliverInterval = 180
seconds, redeliverMax = 10)), name = "bc")
override def receive = {
case Start =>
for(i <- 1 to 10) {
channel ! Deliver(Persistent(i), b, Resolve.Destination)
println(s"sent $i")
Thread.sleep(1000)
}
}
}
class B extends Processor {
override def receive = {
case p @ ConfirmablePersistent(payload, sequenceNr, redeliveries) =>
println(" B received " + payload.toString)
Thread.sleep(3000)
p.confirm()
println(" B confirmed " + payload.toString)
}
}
And here is what I have in the log:
sent 1
B received 1
sent 2
sent 3
sent 4
B confirmed 1
B received 2
sent 5
sent 6
sent 7
B confirmed 2
B received 3
sent 8
sent 9
sent 10
B confirmed 3
B received 4
B confirmed 4
B received 5
B confirmed 5
B received 6
B confirmed 6
B received 8
B confirmed 8
B received 10
B confirmed 10
B received 9
B confirmed 9
B received 7
B confirmed 7
why are the messages 8, 10, 9, 7 coming out-or-order? As I understand there
is no redelivery here so they must be in order
Thanks
Vadim
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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/groups/opt_out.