consume method in pubsub, and fix pubsub to publish and return dicts or lists, not strings