我正在初始化一个 activeMQ 嵌入式代理,如下所示:
BrokerService broker = new BrokerService();
broker.addConnector("http://localhost:8161");
broker.start();
然后我对以下 URL 执行一些 Json 字符串的帖子,以使用 ActiveMQ 的 REST 功能:
"http://localhost:8161/api/message/EventQueue?type=queue"
我收到以下异常:
com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not s (position: START_DOCUMENT seen s... @1:1)
我认为嵌入式代理可能需要一些配置才能与 Json 一起使用,但我在 activeMQ 帮助中找不到有关这些的信息。
非常感谢!