I am trying to send a message that the client inputs into the browser to a queue using STOMP and ActiveMQ. The STOMP connection is successful from the readouts I get in the console. I am not receiving errors and am using the line:
stompClient.send("/queue/testQSource", {}, JSON.stringify({ 'name': name }));
in my index.html to do so. However, when I check the ActiveMQ console after inputting into the browser, there is no addition to testQSource. Am I using the correct STOMP syntax to make this happen? Do I need to add any sources at the top of the HTML file other than the STOMP source?
The queue is instantiated here in the camel route:
<from uri="jms:queue:testQSource"/>
<to uri="securityBean"/>
<log message="Routing message from testQSource to testQDestination queue with data ${body}"/>
<to uri="jms:queue:testQDestination"/>
<to uri="activationBean"/>
<log message="message: ${body}"/>
EDIT
I am now getting a message through, but am receiving the following warning:
WARN : org.apache.camel.component.jms.JmsBinding - Cannot determine specific JmsMessage type to use from body class. Will use generic JmsMessage. Body class: hello.HelloMessage. If you want to send a POJO then your class might need to implement java.io.Serializable, or you can force a specific type by setting the jmsMessageType option on the JMS endpoint.
I believe this is because the STOMP message is of a different form than the queue and/or route are expecting. However, I am not sure how to configure my route in a way that will allow me to use my STOMP message. Any tips?