Question

I followed the examples of the activemq site to start an embedded broker:

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

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

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

When I send the post using a standalone broker it all works fine, but when I use the embedded broker it hangs the process.

I am using active mq version 5.8.0

What I am missing?

Thanks

Was it helpful?

Solution

You are adding a TCP connector which uses the openwire protocol but you are sending post requests as if it's an HTTP connector. You need to add an HTTP transport based connector and use that one to do your posts.

You must of course ensure that you have the classes on the classpath for http, which is in the activemq-http bundle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top