Add configuration and publish() method