API: Publish and subscribe (70%)