Messaging in Java library