This paper presents middleware mechanisms to support real-time services in heterogeneous sensor networks, focusing on the evaluation of link metrics. Heterogeneous sensor networks require specific QoS (quality of service) guarantees in order to allow the coordination and cooperation among the different nodes that compose the system. In order to improve QoS, one of the first steps is to enhance the usage of the communication links, aiming at a more reliable and efficient message exchange. In this paper, key middleware features to address this concern are presented, in which a focus is given on the use of a link metric that, as part of a protocol, is used to optimize the message forwarding in relay communications across the network. Additionally, preliminary results are also presented.