How do I get the complete message including the header from Grails JMS?

I want to get the complete message (header and body) from an ActiveMQ connection using Grails and JMS.

The code below returns the body of the message. When I uncomment the "static adapter =" line, I get the title and a shorthand version of the title. How do I get a complete message?

class NrodTmListenerService {
    static exposes = ["jms"]
    static destination = "SOMEDESTINATION"
    static isTopic = true
    //  static adapter = "zeroConversionAdapter"    

    def onMessage(msg) {

        // handle message

        // explicitly return null to prevent unwanted replyTo attempt
        return null
    }
}

      

In my config.groovy:

jms {
    adapters {
        zeroConversionAdapter {
            meta {
                parentBean = 'standardJmsListenerAdapter'
            }
            messageConverter = null
        }
    }
}

      

+3


source to share





All Articles