Use message endpoints rather than deprecated message sender and receiver
Added set variable method to Java DSL in order to make usage more clear