update publisher demo to show how to set TTL