Content-based publish-subscribe middleware is emerging as a promising answer to the demands of modern highly dynamic distributed computing by providing the necessary decoupling and flexibility. The majority of currently available systems implement event dispatching on top of an overlay network with a tree topology. However, they fail to provide any mechanism to maintain it in the presence of failures, thus hampering their applicability in dynamic scenarios.

In this paper, we present a novel approach to reconfiguring the overlay topology by exploiting a Distributed Hash Table. Our algorithm supports arbitrary tree topologies and deals very well with the dynamicity of network scenarios by limiting the impact of reconfigurations induced by topology changes. These results are confirmed by simulations which validate the applicability of our approach in reconfigurable publish-subscribe middleware. Beyond publish-subscribe, the algorithm is applicable in a wide range of contexts and provides a general way to maintain an overlay network with a controlled topology in dynamic environments.