Subscribe to custom message

Also, how can I define a custom message in the cloud for the CORE2 to use. And use that message to publish over a topic?