Publish/subscribe systems have to react fast on changes in their environment while
handling many events with low end-to-end latency and high throughput. Moving the broker
functionality of publish/subscribe systems to the underlying network layer reduces
the path length of events and, in addition, forwarding benefits from powerful and
programmable hardware. So far attempts of underlay publish/subscribe depend on a specific
API of the network devices, e. g., the OpenFlow protocol, which have restrictions
in dealing with dynamic devices and corresponding changes in the introduced attribute
names for matching and filtering events.In this work, we focus on the next generation
of network devices, which are envisioned to provide reconfigurable hardware components,
specified by the open P4 description language. We introduce two new approaches that
enable a flexible and generic attribute/value encoding, understandable by P4-capable
packet processors, to benefit from the performance properties of hardware. Furthermore,
the proposed approaches reduce the effort in encoding and decoding event messages.