arXiv:2608.25728cs.DCAug 2026

Manuscript Offprint

arXiv:2608.25728

A Spatially-Aware Publish-Subscribe Middleware for IoT Applications

Philipp Ungrund, Kurt Rothermel, Sukanya Bhowmik

Philipp Ungrund*, Kurt Rothermel† Sukanya Bhowmik*,

*University of Potsdam, Germany, †University of Stuttgart, Germany

Email: *lastname@uni-potsdam.de, †kurt.rothermel@ipvs.uni-stuttgart.de

Abstract—Spatial and proximity awareness are critical enablers for efficient communication in Cyber-Physical Systems (CPS) and the Internet of Things (IoT). However, the lack of suitable middleware support and standardized mechanisms for spatial awareness significantly limits the pervasiveness of location-dependent applications. In this paper, we present a novel approach that extends topic-based publish-subscribe, a dominant messaging model in this domain, with integrated spatial filtering and routing capabilities. Our approach leverages a highly flexible geometric method for describing spatial filters, enabling expressive and efficient spatial subscriptions. A geometric world model operates together with an enhanced topic-based broker to realize spatially constrained message dissemination. Importantly, this functionality is achieved using the MQTT5 protocol without violating the standard or requiring any modifications to existing client implementations. Experimental results based on both synthetic and real-world data demonstrate strong system efficiency, minimal computational overhead at the broker, and the practical feasibility of deploying the approach on existing IoT devices.

Index Terms—Publish/Subscribe, Spatial-Awareness, Digital Twins, IoT

I. INTRODUCTION

The Internet of Things (IoT) is a significant technology that profoundly impacts everyday life, industries, and the economy. IoT technology focuses on connecting devices and enabling data exchange in networked environments. It is therefore a building block for Cyber-Physical Systems (CPS), which emphasize the close integration of computing, networking, and physical processes to monitor and control real-world assets and processes. Digital twins leverage CPS models and IoT data to enable real-time monitoring, simulation, and optimization of their physical counterparts.

The publish-subscribe (pub/sub) communication paradigm has been identified as a basic building block of the IoT. Publishers send messages without knowing the recipients, and subscribers register for the messages they are interested in without knowing the senders. In topic-based pub/sub, messages are associated with topics, and subscribers register for topics of interest. This communication model allows many-to-many communication, decoupling senders from receivers for better scalability and flexibility. The primary standard for pub/sub communication in the IoT is MQTT [15], alongside protocols like AMQP [27], CoAP [24], etc.

A distinctive feature of CPS is that they maintain digital representations of their physical objects. These digital entities keep state data, which reflects the physical, operational and contextual status of their physical counterparts. This data forms the basis for monitoring, controlling, and optimizing physical entities and real-world processes. Digital entities are also referred to as resources [11], things [23], objects [10], or digital twins [17] elsewhere.

The state of an entity often depend on the states of other physical entities. Therefore, digital entities need to be informed about state changes of the physical entities they depend on, their group of interest. For example, a digital entity representing a particular intersection wants to receive traffic flow data for all adjacent road segments to determine the intersection's current traffic load. Physical entities, like roads and intersections, are situated in space. Therefore, the spatial relationships between these entities provide a powerful means of selecting groups of interest. These relationships define how physical entities interact geometrically; for example, entities may contain, touch, or intersect each other. In our example above, the spatial relation "touches" would be used to determine which road segments are of interest.

Few pub/sub systems support spatial relationships as a message filtering concept. Location-based pub/sub systems (e.g., [5], [9], [12], [13], [16]) support geofencing, a concept that allows subscribers to define an area of interest for each topic. Messages are only forwarded to consumers if they were published in the corresponding area of interest. However, these schemes are limited to a single spatial relation: containment. Furthermore, the location of publishers is used for filtering messages rather than that of the owner of the transferred state. This requires the state owner to be physically co-located with the publisher, which severely limits the placement of publishers.

In this paper, we propose spaPS, a novel spatial pub/sub middleware tailored to the specific needs of CPS. With spaPS, we expand the publish/subscribe paradigm to include physical entities, thereby accommodating the physical aspect of CPS. The digital counterparts of physical objects, which can act as publishers and consumers, represent the virtual part of CPS. Our system supports topic-based message filtering, although the proposed spatial extensions could also be combined with content-based filtering.

Each published message is assigned a topic, which indicates the type of state data included in the message. Additionally, it is associated with the physical entity whose state is transferred in the message. Consumers subscribe to topics and groups of interest, called neighborhoods, inspired by Tobler's first

This is the author's version of the work. It is posted here for your personal use. Not for redistribution. A revised and more concise version of this work is available in proceedings of the DISCOLI workshop of the 22nd IEEE International Conference on Distributed Computing in Smart Systems and the Internet of Things (DCOSS-IoT), 2026.

law of geography [26], which states that nearby things are more relevant than distant ones. In particular, each subscription specifies topics and a neighborhood, indicating the physical entities whose state data the subscriber wants to receive.

spaPS’s architecture leverages the inherent customizability of MQTT version 5 and completely conforms to the standard. With this approach, all additional complexity is confined to the broker while client implementations can stay virtually unchanged. Thus, publishers and subscribers can continue to run on resource-limited devices and the protocol’s lightweight character is kept. For the broker’s implementation, we enhance ActiveMQ Artemis as an open source, multi-core, and highly performant basis [20].

The contributions of this paper are as follows:

• An expressive scheme for specifying neighborhoods based on spatial relationships, which are the foundation of subscriptions.

• An architecture that incorporates spatial filtering on these neighborhoods into classic topic-based pub/sub systems while adhering to the MQTT standard.

• An implementation of this architecture on the ActiveMQ Artemis broker that can be used as a drop-in replacement.

• Extensive evaluations of spaPS that demonstrate the practical feasibility and efficiency of the novel middleware.