When using the jms namespace to configure a message-listener container, a MessageListenerAdapter is created for each configured listener, including (SessionAware)MessageListeners. In the onMessage() method of the adapter, the message is converted to an object using a MessageConverter. This works fine for Text, Map, and ObjectMessages, but not for BytesMessages, which only provide streaming access to the contents.
Thus, when a messagelistener wants to read the bytes stream from the message, the message payload has already been read, resulting in MessageEOFExceptions.
The fix would be to check whether the delegate is a (SessionAware)MessageListener first, and only if it's not do the conversion.