There is no need for that. setRecipientVariable is, tmh sufficient. You will usually build your array and directly pass it to the message. I'd prefer to keep the message classes really simple.