LibraryToggle FramesPrintFeedback

To run these examples, you require:

  • Apache Ant build tool, version 1.6 or later.

  • Standalone Fuse Message Broker package, available from fusesource.com. It is assumed that you install this package to the directory, ActiveMQInstallDir.

For full details of how to deploy a broker in the OSGi container, please read Deploying a JMS Broker in Deploying into the OSGi Container. If you have not already deployed a broker, you can create and deploy a new broker, broker1, by entering the following console command:

karaf@root> activemq:create-broker --name broker1

Add a HTTP transport connector by editing the broker configuration file (in InstallDir/deploy/broker1-broker.xml) as follows:

<beans>
  ...
  <transportConnectors>
    ...
    <transportConnector name="openwire" uri="tcp://localhost:61616"/>
    <transportConnector name="http"   uri="http://localhost:61620"/>
  </transportConnectors>
  ...
</beans>

To connect the producer tool to the http://localhost:61620 endpoint (OpenWire over HTTP), enter the following command from the example directory:

ant producer -Durl=http://localhost:61620

This command sends ten new messages to the consumer client.

[Note]Note

The JAR files for the HTTP protocol are currently located in the lib/optional subdirectory. If you construct the CLASSPATH manually, you must be sure to include the JAR files from this subdirectory.

Comments powered by Disqus