In this paper we present GREEN a highly configurable and reconfigurable publish-subscribe middleware to support pervasive computing applications. Such applications must embrace both heterogeneous networks and heterogeneous devices: from embedded devices in wireless ad-hoc networks to high-power computers in the Internet. Publish-subscribe is a paradigm well suited to applications in this domain. However, present-day publish-subscribe middleware does not adequately address the configurability and reconfigurability requirements of such heterogeneous and changing environments. As one prime example, current platforms can-not be configured to operate in diverse network types (e.g. infrastructure based fixed networks and mobile ad-hoc networks). Hence, we present the design and implementation of GREEN (Generic & Re-configurable EvEnt Notification service), a next generation publish-subscribe middleware that addresses this particular deficiency. We demonstrate the configurability and re-configurability of GREEN through a worked example: consisting of a vehicular ad-hoc network for safe driving coupled with a fixed wide area network for vehicular traffic monitoring. Finally, we evaluate the performance of this highly dynamic middleware under different environmental conditions.