An example message service in Java