In today’s IoT environments, message brokers play a pivotal role in facilitating data exchange between IoT devices and applications. Existing message broker implementations offer different configuration options for IoT systems designers for performance tuning. However, designers still have to manually configure the message broker to find the best parameters combination that satisfies the requirements of the deployed applications. In addition, runtime changes might lead to performance degradation and require reconfiguration. This paper presents a publish/subscribe message broker architecture for enabling adaptive data exchange in IoT environments. Core software components are proposed for (i) refining per-subscription data flows based on the applications deployed in the environment, (ii) dynamically assigning drop rates or priorities to data flows according to the requirements of these applications, and (iii) enabling the adaptation of data flows based on dynamic changes in the environment or evolving applications’ requirements. The proposed architecture is enriched with automated planning capabilities for providing such adaptation of data flows. To demonstrate the applicability of our architecture, we implement the PlanEMQX prototype. Our experimental evaluation shows improvements of 20% of response time for time-sensitive data flows.