- Download ActiveMQ 5.9 from this location http://repo.fusesource.com/nexus/content/repositories/releases/org/apache/activemq/apache-activemq/5.9.0.redhat-610312/
or using Apache Release
http://repo1.maven.org/maven2/org/apache/activemq/apache-activemq/5.9.0/
-
start Jetty Web Server
cd websocket-activemq-camel/web mvn jetty:run
-
Start ActiveMQ 5.x using the config provided in feeder/src/main/config directory
cd
/fuse/servers/apache-activemq-5.x/bin ./activemq console xbean:file:/Fuse/fuse-by-examples/websocket-activemq-camel/feeder/src/main/config/activemq-websocket.xml -
Compile and start Feed application
cd websocket-activemq-camel/feed mvn -P run-trader
-
Open your web browser at this address
and click on connect button
Remark : To connect from the web page to the ActiveMQ broker, the login to be used is guest & password is password
-
Start Apache Camel Routes (without using wss://)
cd websocket-activemq-camel/camel-ws mvn camel:run
-
Compile and Start Feed application
cd websocket-activemq-camel/feed mvn -P run-trader
-
Verify stock and news websockets in your browser
http://localhost:9090/stocks-camel.html http://localhost:9090/news-camel.html
and click on connect button
To test SSL & wss:// protocol, execute the follownig command
-
Start Apache Camel Routes (with wss:// & HTTPS)
cd websocket-activemq-camel/camel-ws-ssl mvn camel:run
-
Compile and Start Feed application
cd websocket-activemq-camel/feed mvn -P run-trader
-
Verify stock and news websockets in your browser
https://localhost:8443/news-camel-wss.html
and click on connect button
-
Download JBoss A-MQ (https://access.redhat.com/downloads/) and unzip/untar the project locally
-
Copy ActiveMQ config file containing ActiveMQ WebSocket transports connectors
cp ~/Fuse/fuse-by-examples/websocket-activemq-camel/feeder/src/main/config/fuseamq-websocket.xml ~/Fuse/servers/jboss-a-mq-6.1.0.redhat-312/etc/activemq.xml
OR
cp ~/Fuse/fuse-by-examples/websocket-activemq-camel/feeder/src/main/config/org.fusesource.mq.fabric.server-default.cfg ~/Fuse/servers/jboss-a-mq-6.1.0.redhat-312/etc
cp ~/Fuse/fuse-by-examples/websocket-activemq-camel/feeder/src/main/config/fuseamq-websocket.xml ~/Fuse/servers/jboss-a-mq-6.1.0.redhat-312/etc/
3)) Add user guest and password password into the file etc/users.properties guest=password,admin
cp /Users/chmoulli/Fuse/fuse-by-examples/websocket-activemq-camel/feeder/src/main/config/users.properties ~/Fuse/servers/jboss-a-mq-6.1.0.redhat-312/etc
-
Start JBoss A-MQ and install the web project
install -s webbundle:mvn:com.fusesource.examples.websocket/web/1.0/war?Web-ContextPath=/activemq-websocket
-
Connect to the web site http://localhost:8181/activemq-websocket/stocks-activemq.html
! Twitter Demo does not work with current Camel 2.10 release as Twitter API 1.0 has been retired ! Camel 2.11 is required
-
Download JBoss Fuse (https://access.redhat.com/downloads/) and unzip/untar the project locally
-
Install features & bundles
Remark : bug discovered with websocket & static resources (https://issues.apache.org/jira/browse/CAMEL-6432) + ssl (https://issues.apache.org/jira/browse/CAMEL-6433)
First, install the XML resources file containing the definition about the modules to be deployed. This features file contains for each module (= a feature), the bundles, configurationss and parameters of the applications to be deployed and also references to others features/modules like camel
, camel-twitter
...
features:addurl mvn:com.fusesource.examples.websocket/features/1.0/xml/features
features:install websocket-demo
The project can also be installed without using the features file created for this project but, in this case, using what is provisioned out of the box on JBoss Fuse platform.
features:install camel
features:install camel-websocket
features:install camel-twitter
features:install activemq-camel
install -s mvn:com.fusesource.examples.activemq.websocket/camel-ws/1.0
-
Compile and Start Feed application
cd websocket-activemq-camel/feed mvn -P run-trader
-
Connect to the web site using these addresses :
http://localhost:9090/news-camel.html http://localhost:9090/stocks-camel.html http://localhost:9090/chat-camel.html
-
Download Apache Karaf (http://karaf.apache.org/index/community/download.html) and unzip/untar the project locally
-
Install features & bundles
features:addurl mvn:com.fusesource.examples.websocket/features/1.0/xml/features features:install websocket-demo
-
Compile and Start Feed application
cd websocket-activemq-camel/feed mvn -P run-trader
-
Connect to the web site using these addresses :
http://localhost:9090/news-camel.html http://localhost:9090/stocks-camel.html http://localhost:9090/chat-camel.html