Java REST based server for messages