In delay tolerant networking (DTN), nodes are autonomous and behave in an unpredictable way. Consequently, a control mechanism of topology is necessary. This mechanism should ensure the overall connectivity of the network taking into account nodes’ mobility. In this paper, we study the problem of data routing with an optimal delay in the bundle layer, by exploiting: the clustering, the messages ferries and the optimal election of cluster head (CH). We first introduce the DTN routing hierarchical topology (DRHT) which incorporates these three factors into the routing metric. We propose an optimal approach to elect a CH based on four criteria: the residual energy, the intra-cluster distance, the node degree and the head count of probable CHs. We proceed then to model a Markov decision process (MDP) to decide the optimal moment for sending data in order to ensure a higher delivery rate within a reasonable delay. At the end, we present the simulation results demonstrating the effectiveness of the DRHT. Our simulation shows that while using the DRHT which is based on the optimal election of CH, the traffic control during the TTL interval (Time To Live) is balanced, which greatly increases the delivery rate of bundles and decreases the loss rate.