publish messages task: all or none