-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
-
0
-
0%
Currently, loopback in TP uses the same thread (or a separate thread, if loopback_queue is enabled), to send the message back up the stack. However, we can't have multiple threads sending messages up the stack (assuming up_thread=false, otherwise there is no problem), because they would destroy the properties established by the protocols.
Example:
once a message leaves NAKACK, the order established by NAKACK (e.g. m3, m4, m5) cannot be changed. However, if we have multiple threads leaving NAKACK, then the threads might pass each other (governed by the thread scheduling), and we might receive m4, m3, m5.
Solution: there needs to be a Message queue for incoming, unmarshalled, messages, that is handled by a single thread. The loopback code should make a copy of the message and simply add it to the queue.