How to configure activemq embedded broker to accept Json post

358 Views Asked by At

I am initializing an activeMQ embedded broker as follows:

BrokerService broker = new BrokerService();
broker.addConnector("http://localhost:8161");
broker.start();

Then I perform some posts of Json Strings to the following URL to use the REST capabilities of ActiveMQ:

"http://localhost:8161/api/message/EventQueue?type=queue"

I am getting the following exception:

com.thoughtworks.xstream.io.StreamException:  : only whitespace content allowed before start tag and not s (position: START_DOCUMENT seen s... @1:1)

I think maybe some configuration is required for the embedded broker to work with Json, but I could not find information about that in the activeMQ help.

Many thanks!

0

There are 0 best solutions below