Supports setting the retain flag on published messages