Added an example cpp program that uses the messaging api.