Make QoS and retain optional on publish