A Semantic Publish-Subscribe Architecture for the Internet of Things