change entitymanager to entity_pubsub