Rendering networks and distributed systems self-managing and self-optimizing has become a major research focus. This task is especially important for systems, such as publish/subscribe systems, that are used in dynamic environments. In these settings, a static configuration usually leads to a largely suboptimal system performance, while manual optimization is either too expensive or not possible at all. Distributed publish/subscribe system are usually realized by a broker overlay network providing the functionality of a decentralized notification service. In this paper, we present an approach that self-optimizes the routing configuration of a publish/subscribe broker overlay network to minimize the operational costs of the system without any manual intervention. It is based on a new class of routing algorithms, which allows a link-bylink adaptation of the routing configuration at runtime. Based on a local decision criterion, a decentralized optimization algorithm is introduced that...