A topic-based, publish-subscribe architecture for intermittently connected 802.15.4 networks