I've been unable to find the answer to this question in the Akka documentation.
I know that two messages published to the same topic in sequence are guaranteed to arrive in the same/correct order. If I publish two messages to two different topics - are they also guaranteed to arrive in the correct order? If not, what paradigms might I use to ensure this? Note: there is a very good reason why I'm not publishing these messages to the same topic.
Thanks for your help.
I should caveat saying that this is to the best of my understanding. It appears that topics in Distributed Pub Sub are baked by actors. Each topic keeps a list of subscribers. The delivery of messages in pub sub will follow the same delivery and ordering guarantees between any pair of actors.
I wanted to address the first comment that messages sent / published to the same topic are guaranteed to be delivered in the same order they sent. This is true only with respect to one subscriber. In this case the topic is an actor and the subscriber is another actor. so messages will be delivered in order (if at all). However, If I have two subscribers (S1 and S2) to the same topic, and I publish messages A and B to the same topic, it is entirely possible that both B (and A) will be delivered to S1 before A is delivered to S2.
It also would appear that, messages sent to different topics will not have any ordering guarantees. If you need this sort of ordering it seems that you would need to encode it into your messaging protocol itself (e.g. sequence numbers, vector clocks, etc.).
Furthermore, regardless of one topic or two topics, for your use case, you may need to think about other issues, such as needing at least once messaging semantics. The reason being that even with one topic, I can't actually guarantee that the first message to a Topic will be delivered before the second. I can guarantee that IF the first message and second messages are delivered (not lost) then the first one will arrive before the second. But the first one may not be delivered at all, and the second one may arrive without the subscriber seeing the first one. This holds for sending messages to the same topic as well as different topics.
If you really need this you may need to evaluate something like the Reliable Proxy Pattern: http://doc.akka.io/docs/akka/current/contrib/reliable-proxy.html
Feedback from other members welcome...