I just ran a quick test using FUSE MB 5.5.0 and followed the instructions available in the Openwire example ( http://fusesource.com/docs/esb/4.4/amq_connectivity/index.html?url=http://fusesource.com/docs/esb/4.4/amq_connectivity/N0377FE98.037AC498.html ).
The only thing I had to change to make it work with the HTTP transport connector was to change the configuration file to include the connector. I used the activemq-demo.xml available under the $FUSEMB_INSTALL_DIR/conf directory and added the following:
Then, I started the broker pointing to that configuration file:
bin/activemq console xbean:conf/activemq-demo.xml
and ran both consumer and producer test sample clients.
I think that would be a very simple way to test the scenario you want and isolate the components you really need to make it work.
Hope this helps,
Thanks Marcelo. Following your steps, I was able to get the example working. However, if I understand correctly, this is running activemq in a standalone mode rather than in the ESB.
The way it is documented in the connectivity guide makes me think I should be able to run a broker in the esb that is configured with the http transport. So far, my attempts to do so have failed.
Since the default broker is not configured with an http transport, I stopped the activemq-broker.xml bundle, then executed the create-broker step.
The next problem was that the package org.apache.activemq.hooks was missing, so I did features:install activemq-spring.
The next problem was that the http transport scheme was not recognized. There wasn't an uninstalled feature for activemq-optional, so I just copied apache-activemq-5.5.0-fuse-00-27\lib\optional\activemq-optional-5.5.0-fuse-00-27.jar to servicemix deploy directory.
Now I'm getting a ServletContextHandler class cast exception when the transport connector is being started. I haven't dug into that one yet, but I'm starting to lose confidence that I'm even going down the right path.
Am I taking the right steps & just need to go a little further?
Or is there a simpler way to get http transport working in a broker deployed in the esb?
Thanks for the feedback David. That's correct. The steps I provided you were based in a standalone instance of ActiveMQ where we could isolate that specific component and troubleshoot it.
You are also correct that FUSE ESB has the capability to run an embedded ActiveMQ instance as it does by default. Basically, the steps should be the same as described in the FUSE ESB documentation (for example, http://fusesource.com/docs/esb/4.4/amq_connectivity/index.html?url=http://fusesource.com/docs/esb/4.4/amq_connectivity/N0377FE98.037AC498.html ).
I did a quick test following the steps above and I was able to deploy the broker successfully as long as I wasn't not deploying the HTTP transport connector. I'll have to investigate on that before give you a concrete answer on why it's failing.
On the other hand, I thought about possible use cases for this and I believe the easiest workaround for you at this point would be using Apache Camel (which is also embedded on ServiceMix) and you could easily create a Camel route that exposes an HTTP endpoint and do whatever you need when other applications connect to it.
Apache Camel (FUSE Mediation Router) has a component called jetty that provides HTTP-based endpoints for consuming HTTP requests. Simply, you have a Web Server running right there.
There is a sample here if you want: http://fusesource.com/docs/router/2.2/component_ref/_IDU_Jetty.html
That's a slightly different approach to what you're trying to do at the moment but it's also powerful and gives you all features Apache Camel (FUSE Mediation Router) offers http://fusesource.com/products/enterprise-camel/#documentation .
Hope this helps,