Closed timobaumann closed 6 years ago
Now the client receives all the messages sent by the server. However, if you need them to be ordered, you have to implement a proper communication between your client and the server, that is, client sends a request, server sends message1, client sends a confirmation, server sends message2, and so on. If you don't want to send the confirmation from clients, MUF can do it automatically for you, you only have to set session.receive.automatic.ack = true in the config.properties file
Hi Oscar, can we change the default behaviour so that messages arrive in order (FIFO) by default and have the LIFO behaviour optional? I frankly cannot envision a use-case where LIFO would be better.
there's now a test-case in my scratch repo git@bitbucket.org:timobaumann/mufswingscratch.git Please have a look at and run test/jav/edu.cmu.lti.articulab.movies.muf.TwoConsecutivePosts with the following modification:
If onEvent in TestOrchestrator is not synchronized, then sometimes messages arrive out-of-order (expected) but what's more, sometimes the broker complains about invald messages. See below. Sometimes, both messages arrive, sometimes just one message arrives.
Expected behaviour: of course, messages may arrive out of order if ordering is not synchronized, but they should certainly work.
As this is a synchronization bug, please make sure that tests work many times in a row. The fact that a test works once does not tell us anything.