updated the example to show only messages to be published