ActiveMQ setup - Unable to send the message to Queue (error - java.io.IOException: Unknown data type: 47) ActiveMQ setup - Unable to send the message to Queue (error - java.io.IOException: Unknown data type: 47) spring spring

ActiveMQ setup - Unable to send the message to Queue (error - java.io.IOException: Unknown data type: 47)


The 'Unknown data type: 47' error is due to the configuration you are using for the following broker URL:

<value>tcp://localhost:8161</value>

The problem is that the port number is incorrect. Port 8161 is where the embedded ActiveMQ web server runs, and therefore where you can access the web console. This explains the error message and stack trace that you're seeing. Whenever you visit the web console for the broker at this address (*:8161) the exception is thrown.

To fix the problem, change the port number to the port on which the ActiveMQ TCP transport is listening. I hazard a guess that it is probably the default port number of 61616.


I think the following is the fault:

<value>tcp://**:8161</value>

in your xml.

Make sure to put the actual address there.


Just for who, like me, had got the same error even if brokerURL was set correctly.Check the usage of the ProducerTemplate class: in my code, for example, I missed the ExchangePattern parameter in the sendBody method of the producer.

Hope this help