publish only if pubsub is 'true'