There is provided a method for mediating the flow of messages in a computer network having a mediation architecture that includes a plurality of logical nodes arranged in a logical mediation cycle. The method provides algorithms for: handing mediation tasks over between mediator nodes; reconfiguring the logical topology of the mediation architecture in response to a change request while maintaining system invariants; and refining the structure of the mediation architecture by adding whole subnetworks in place of single nodes. The method also addresses failure detection and recovery