Added code to demonstrate how to use publish confirms