#58 as added delayed messages support in the default MessageEngine.
Currently, when calling Topology.restart(), the Topology "manually" clears each Node's mailBox and sendQueue, using Topology.clearMessages().
Three points:
-
I think that clearing messages should be under the responsibility of the MessageEngine
-
The current implementation does not clear the delayMessages
Because of these pending messages, in a simple delay-enabled broadcast example, a broadcast wave might oddly continue although the user asked for a restart.
-
I don't think Topology.clearMessages() and Topology.restart() have the behavior a user would expect
I suggest creating a MessageEngine.reset() which would do the job, and would be called by Topology.clearMessages().
@acasteigts , do you agree?
#58 as added delayed messages support in the default
MessageEngine.Currently, when calling
Topology.restart(), theTopology"manually" clears eachNode's mailBox and sendQueue, usingTopology.clearMessages().Three points:
I think that clearing messages should be under the responsibility of the
MessageEngineThe current implementation does not clear the delayMessages
Because of these pending messages, in a simple delay-enabled broadcast example, a broadcast wave might oddly continue although the user asked for a restart.
I don't think
Topology.clearMessages()andTopology.restart()have the behavior a user would expectI suggest creating a
MessageEngine.reset()which would do the job, and would be called byTopology.clearMessages().@acasteigts , do you agree?