That code is trying to communicate with the broker without using the broker's protocol (openwire). So, the broker is really complaining that it cannot properly parse the content.
The correct way to use TCP/IP to connect to the broker is to create an ActiveMQConnectionFactory() using the tcp transport (like this for localhost: tcp://localhost:61616), and then use the ActiveMQConnection to create a session and producer, then send a message. -- View this message in context: http://activemq.2283324.n4.nabble.com/Receiving-over-IP-and-port-using-TCP-tp4686563p4686567.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.