This paper presents an implementation of the Zenoh pub-sub stack using P4. Traditional pub-sub protocols generally rely on a centralized broker to forward messages. Using P4, one could make every network equipment able to assume such role, with the whole system behaving as a distributed broker. By deploying network tasks at the edge, this approach can reduce end-to-end latency and the overhead caused by packet retransmission due to packet loss. The proposed implementation accounts for the offloading of some control tasks into the data plane. The prototype is validated and the impact of the task offloading features is assessed. Results show that offloading can be beneficial and improve network performance. Still, our system is outperformed by traditional Zenoh Routers, which is explained by the lack of performance of the used BMv2 software switch. To account for these limitations, future developments from this work will target hardware-based validation.