This video gives a basic introduction of Messenger API and explains how it is used to prepare the Service to handle the messages from the remote process/app.

source