Try PubSub+

Spring cloud stream -- jmsTempate

akg17akg17 Member Posts: 44
edited May 21 in General Discussions #1

I am trying to read a message using jmsTemplate but not able to cast it, i need to read payload/body and then i have to drop that message using jmsTempate to another queue.
class com.solacesystems.jms.message.SolBytesMessage cannot be cast to class javax.jms.Message


  • marcmarc Member, Administrator, Moderator, Employee Posts: 523 admin

    Hey @akg17,
    I'm not sure I 100% follow. Are you just using Spring Cloud Stream or are you trying to send/receive messages between some apps using Spring Cloud Stream and others using JMS?

    Note that the Solace Spring Cloud Stream binder does not use our JMS API so you wouldn't use JMS concepts when using it. If you want to consume a message to access the headers, etc. in Spring Cloud Stream use the Spring Message: org.springframework.messaging.Message.

  • akg17akg17 Member Posts: 44
    You can get detail here what i am trying to do and also the spring message class can not be casted
    ava.lang.ClassCastException: class com.solacesystems.jms.message.SolBytesMessage cannot be cast to class org.springframework.messaging.Message (com.solacesystems.jms.message.SolBytesMessage and org.springframework.messaging.Message are in unnamed module of loader 'app')
    I just want to read only dlq/ error queue message using consumer manually not using listeners.

Sign In or Register to comment.