When i read message from solace queue using a consumer i get some issues while casting it

Hi Team,

We also get the same issue when spring cloud stream reply the message to non spring cloud stream service.

com.solacesystems.jcsmp.impl.BytesMessageImpl cannot be cast to com.solacesystems.jcsmp.TextMessage"

Code:

textMessage.setText(((TextMessage)replyMessage).getText());

Do we need to type cast to BytesMessage and use getData API and convert to String?