Today, communication between IoT devices heavily relies on fog-based publish/subscribe (pub/sub) systems. Communicating via the cloud, however, results in a latency that is too high for many IoT applications. In this paper, we describe the design of a fog-based pub/sub system that integrates edge resources to improve communication latency between end devices in proximity. To this end, geo-distributed broker instances organize themselves in dynamically sized broadcast groups. Each broadcast group comprises a set of well connected edge brokers that communicate directly using flooding. This minimizes communication latency and copes well with frequently updated subscriptions and mobile end devices, which is required by many IoT applications. Messages between broadcast groups are routed via a massively scalable fog broker that pre-filters messages to reduce excess data dissemination. Our approach, therefore, manages the tradeoff between latency and excess data.