Added functionality so that publish and retrieve check if the memberID is a publisher/subscriber